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>
This commit is contained in:
Simon Wülker 2024-11-19 23:54:59 +01:00 committed by GitHub
parent 79a2f070ed
commit c73e4baca2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 16 deletions

View file

@ -14,7 +14,7 @@ use crate::dom::bindings::codegen::Bindings::CryptoBinding::CryptoMethods;
use crate::dom::bindings::error::{Error, Fallible};
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
use crate::dom::bindings::str::USVString;
use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope;
use crate::dom::subtlecrypto::SubtleCrypto;
use crate::script_runtime::JSContext;
@ -72,7 +72,7 @@ impl CryptoMethods for Crypto {
}
// https://w3c.github.io/webcrypto/#Crypto-method-randomUUID
fn RandomUUID(&self) -> USVString {
fn RandomUUID(&self) -> DOMString {
let uuid = Uuid::new_v4();
uuid.hyphenated()
.encode_lower(&mut Uuid::encode_buffer())