servo/components/script/dom/webidls/Crypto.webidl
Simon Wülker c73e4baca2
Preference-gate crypto.subtle (#34295)
* Update Crypto idl bindings

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Pref-gate Crypto.subtle attribute

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-11-19 22:54:59 +00:00

19 lines
658 B
Text

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
/*
* The origin of this IDL file is
* https://w3c.github.io/webcrypto/#crypto-interface
*
*/
partial interface mixin WindowOrWorkerGlobalScope {
[SameObject] readonly attribute Crypto crypto;
};
[Exposed=(Window,Worker)]
interface Crypto {
[SecureContext, Pref="dom.crypto.subtle.enabled"] readonly attribute SubtleCrypto subtle;
[Throws] ArrayBufferView getRandomValues(ArrayBufferView array);
[SecureContext] DOMString randomUUID();
};