diff --git a/CHANGELOG.md b/CHANGELOG.md index 8020b205688..5959339c425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ * Add bindings for `RTCRtpReceiver.jitterBufferTarget`. [#3968](https://github.com/rustwasm/wasm-bindgen/pull/3968) +* Generate getters for all WebIDL dictionary types. + [#3993](https://github.com/rustwasm/wasm-bindgen/pull/3993) + ### Changed * Stabilize Web Share API. @@ -62,6 +65,9 @@ * Update and stabilize the Clipboard API. [#3992](https://github.com/rustwasm/wasm-bindgen/pull/3992) +* Deprecate builder-pattern type setters for WebIDL dictionary types and introduce non-mutable setters instead. + [#3993](https://github.com/rustwasm/wasm-bindgen/pull/3993) + ### Fixed * Copy port from headless test server when using `WASM_BINDGEN_TEST_ADDRESS`. diff --git a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs index b453ed0641c..3a600c0442e 100644 --- a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] pub type AddEventListenerOptions; + #[doc = "Get the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[wasm_bindgen(method, getter = "capture")] + pub fn get_capture(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "capture")] - fn capture_shim(this: &AddEventListenerOptions, val: bool); + pub fn set_capture(this: &AddEventListenerOptions, val: bool); + #[doc = "Get the `once` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[wasm_bindgen(method, getter = "once")] + pub fn get_once(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `once` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "once")] - fn once_shim(this: &AddEventListenerOptions, val: bool); + pub fn set_once(this: &AddEventListenerOptions, val: bool); + #[doc = "Get the `passive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[wasm_bindgen(method, getter = "passive")] + pub fn get_passive(this: &AddEventListenerOptions) -> Option; + #[doc = "Change the `passive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] #[wasm_bindgen(method, setter = "passive")] - fn passive_shim(this: &AddEventListenerOptions, val: bool); + pub fn set_passive(this: &AddEventListenerOptions, val: bool); } impl AddEventListenerOptions { #[doc = "Construct a new `AddEventListenerOptions`."] @@ -26,25 +50,19 @@ impl AddEventListenerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `capture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_capture()` instead."] pub fn capture(&mut self, val: bool) -> &mut Self { - self.capture_shim(val); + self.set_capture(val); self } - #[doc = "Change the `once` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_once()` instead."] pub fn once(&mut self, val: bool) -> &mut Self { - self.once_shim(val); + self.set_once(val); self } - #[doc = "Change the `passive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + #[deprecated = "Use `set_passive()` instead."] pub fn passive(&mut self, val: bool) -> &mut Self { - self.passive_shim(val); + self.set_passive(val); self } } diff --git a/crates/web-sys/src/features/gen_AesCbcParams.rs b/crates/web-sys/src/features/gen_AesCbcParams.rs index a342b655e6a..d4bcce9127e 100644 --- a/crates/web-sys/src/features/gen_AesCbcParams.rs +++ b/crates/web-sys/src/features/gen_AesCbcParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] pub type AesCbcParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesCbcParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesCbcParams, val: &str); + pub fn set_name(this: &AesCbcParams, val: &str); + #[doc = "Get the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[wasm_bindgen(method, getter = "iv")] + pub fn get_iv(this: &AesCbcParams) -> ::js_sys::Object; + #[doc = "Change the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] #[wasm_bindgen(method, setter = "iv")] - fn iv_shim(this: &AesCbcParams, val: &::js_sys::Object); + pub fn set_iv(this: &AesCbcParams, val: &::js_sys::Object); } impl AesCbcParams { #[doc = "Construct a new `AesCbcParams`."] @@ -26,18 +42,14 @@ impl AesCbcParams { ret.iv(iv); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `iv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + #[deprecated = "Use `set_iv()` instead."] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { - self.iv_shim(val); + self.set_iv(val); self } } diff --git a/crates/web-sys/src/features/gen_AesCtrParams.rs b/crates/web-sys/src/features/gen_AesCtrParams.rs index ce6270ad036..6a8e17f3bb7 100644 --- a/crates/web-sys/src/features/gen_AesCtrParams.rs +++ b/crates/web-sys/src/features/gen_AesCtrParams.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] pub type AesCtrParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesCtrParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesCtrParams, val: &str); + pub fn set_name(this: &AesCtrParams, val: &str); + #[doc = "Get the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[wasm_bindgen(method, getter = "counter")] + pub fn get_counter(this: &AesCtrParams) -> ::js_sys::Object; + #[doc = "Change the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "counter")] - fn counter_shim(this: &AesCtrParams, val: &::js_sys::Object); + pub fn set_counter(this: &AesCtrParams, val: &::js_sys::Object); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &AesCtrParams) -> u8; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesCtrParams, val: u8); + pub fn set_length(this: &AesCtrParams, val: u8); } impl AesCtrParams { #[doc = "Construct a new `AesCtrParams`."] @@ -29,25 +53,19 @@ impl AesCtrParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `counter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_counter()` instead."] pub fn counter(&mut self, val: &::js_sys::Object) -> &mut Self { - self.counter_shim(val); + self.set_counter(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u8) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs index f0dc4f1e939..e36567f1bc1 100644 --- a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] pub type AesDerivedKeyParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesDerivedKeyParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesDerivedKeyParams, val: &str); + pub fn set_name(this: &AesDerivedKeyParams, val: &str); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &AesDerivedKeyParams) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesDerivedKeyParams, val: u32); + pub fn set_length(this: &AesDerivedKeyParams, val: u32); } impl AesDerivedKeyParams { #[doc = "Construct a new `AesDerivedKeyParams`."] @@ -26,18 +42,14 @@ impl AesDerivedKeyParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_AesGcmParams.rs b/crates/web-sys/src/features/gen_AesGcmParams.rs index 13bac4af42c..94918a67623 100644 --- a/crates/web-sys/src/features/gen_AesGcmParams.rs +++ b/crates/web-sys/src/features/gen_AesGcmParams.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub type AesGcmParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesGcmParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesGcmParams, val: &str); + pub fn set_name(this: &AesGcmParams, val: &str); + #[doc = "Get the `additionalData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[wasm_bindgen(method, getter = "additionalData")] + pub fn get_additional_data(this: &AesGcmParams) -> Option<::js_sys::Object>; + #[doc = "Change the `additionalData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "additionalData")] - fn additional_data_shim(this: &AesGcmParams, val: &::js_sys::Object); + pub fn set_additional_data(this: &AesGcmParams, val: &::js_sys::Object); + #[doc = "Get the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[wasm_bindgen(method, getter = "iv")] + pub fn get_iv(this: &AesGcmParams) -> ::js_sys::Object; + #[doc = "Change the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "iv")] - fn iv_shim(this: &AesGcmParams, val: &::js_sys::Object); + pub fn set_iv(this: &AesGcmParams, val: &::js_sys::Object); + #[doc = "Get the `tagLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[wasm_bindgen(method, getter = "tagLength")] + pub fn get_tag_length(this: &AesGcmParams) -> Option; + #[doc = "Change the `tagLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] #[wasm_bindgen(method, setter = "tagLength")] - fn tag_length_shim(this: &AesGcmParams, val: u8); + pub fn set_tag_length(this: &AesGcmParams, val: u8); } impl AesGcmParams { #[doc = "Construct a new `AesGcmParams`."] @@ -30,32 +62,24 @@ impl AesGcmParams { ret.iv(iv); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `additionalData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_additional_data()` instead."] pub fn additional_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.additional_data_shim(val); + self.set_additional_data(val); self } - #[doc = "Change the `iv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_iv()` instead."] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { - self.iv_shim(val); + self.set_iv(val); self } - #[doc = "Change the `tagLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + #[deprecated = "Use `set_tag_length()` instead."] pub fn tag_length(&mut self, val: u8) -> &mut Self { - self.tag_length_shim(val); + self.set_tag_length(val); self } } diff --git a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs index b525478f622..d202b081c0c 100644 --- a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] pub type AesKeyAlgorithm; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesKeyAlgorithm, val: &str); + pub fn set_name(this: &AesKeyAlgorithm, val: &str); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &AesKeyAlgorithm) -> u16; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesKeyAlgorithm, val: u16); + pub fn set_length(this: &AesKeyAlgorithm, val: u16); } impl AesKeyAlgorithm { #[doc = "Construct a new `AesKeyAlgorithm`."] @@ -26,18 +42,14 @@ impl AesKeyAlgorithm { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u16) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_AesKeyGenParams.rs b/crates/web-sys/src/features/gen_AesKeyGenParams.rs index 266ae71921d..9b9debe146c 100644 --- a/crates/web-sys/src/features/gen_AesKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_AesKeyGenParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] pub type AesKeyGenParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AesKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesKeyGenParams, val: &str); + pub fn set_name(this: &AesKeyGenParams, val: &str); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &AesKeyGenParams) -> u16; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesKeyGenParams, val: u16); + pub fn set_length(this: &AesKeyGenParams, val: u16); } impl AesKeyGenParams { #[doc = "Construct a new `AesKeyGenParams`."] @@ -26,18 +42,14 @@ impl AesKeyGenParams { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u16) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_Algorithm.rs b/crates/web-sys/src/features/gen_Algorithm.rs index 3a82cd9e61e..18164738e02 100644 --- a/crates/web-sys/src/features/gen_Algorithm.rs +++ b/crates/web-sys/src/features/gen_Algorithm.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] pub type Algorithm; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &Algorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &Algorithm, val: &str); + pub fn set_name(this: &Algorithm, val: &str); } impl Algorithm { #[doc = "Construct a new `Algorithm`."] @@ -23,11 +31,9 @@ impl Algorithm { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs index ac016920b6f..c04735b5385 100644 --- a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs @@ -14,12 +14,60 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AllowedBluetoothDevice; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "allowedServices")] + pub fn get_allowed_services(this: &AllowedBluetoothDevice) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedServices")] - fn allowed_services_shim(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_services(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &AllowedBluetoothDevice) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &AllowedBluetoothDevice, val: &str); + pub fn set_device_id(this: &AllowedBluetoothDevice, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mayUseGATT` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mayUseGATT")] + pub fn get_may_use_gatt(this: &AllowedBluetoothDevice) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mayUseGATT` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mayUseGATT")] - fn may_use_gatt_shim(this: &AllowedBluetoothDevice, val: bool); + pub fn set_may_use_gatt(this: &AllowedBluetoothDevice, val: bool); } #[cfg(web_sys_unstable_apis)] impl AllowedBluetoothDevice { @@ -42,36 +90,21 @@ impl AllowedBluetoothDevice { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedServices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_services()` instead."] pub fn allowed_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_services_shim(val); + self.set_allowed_services(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); + self.set_device_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mayUseGATT` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_may_use_gatt()` instead."] pub fn may_use_gatt(&mut self, val: bool) -> &mut Self { - self.may_use_gatt_shim(val); + self.set_may_use_gatt(val); self } } diff --git a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs index 23070d3117d..24c4c4c2db0 100644 --- a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs @@ -14,12 +14,60 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AllowedUsbDevice; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "productId")] + pub fn get_product_id(this: &AllowedUsbDevice) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &AllowedUsbDevice, val: u8); + pub fn set_product_id(this: &AllowedUsbDevice, val: u8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "serialNumber")] + pub fn get_serial_number(this: &AllowedUsbDevice) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serialNumber")] - fn serial_number_shim(this: &AllowedUsbDevice, val: &str); + pub fn set_serial_number(this: &AllowedUsbDevice, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "vendorId")] + pub fn get_vendor_id(this: &AllowedUsbDevice) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &AllowedUsbDevice, val: u8); + pub fn set_vendor_id(this: &AllowedUsbDevice, val: u8); } #[cfg(web_sys_unstable_apis)] impl AllowedUsbDevice { @@ -37,36 +85,21 @@ impl AllowedUsbDevice { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `productId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_product_id()` instead."] pub fn product_id(&mut self, val: u8) -> &mut Self { - self.product_id_shim(val); + self.set_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `serialNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_serial_number()` instead."] pub fn serial_number(&mut self, val: &str) -> &mut Self { - self.serial_number_shim(val); + self.set_serial_number(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `vendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u8) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id(val); self } } diff --git a/crates/web-sys/src/features/gen_AnalyserOptions.rs b/crates/web-sys/src/features/gen_AnalyserOptions.rs index 776ce399d63..e5ff28832c3 100644 --- a/crates/web-sys/src/features/gen_AnalyserOptions.rs +++ b/crates/web-sys/src/features/gen_AnalyserOptions.rs @@ -10,22 +10,80 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub type AnalyserOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &AnalyserOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AnalyserOptions, val: u32); + pub fn set_channel_count(this: &AnalyserOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &AnalyserOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AnalyserOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AnalyserOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &AnalyserOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AnalyserOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AnalyserOptions, val: ChannelInterpretation); + #[doc = "Get the `fftSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[wasm_bindgen(method, getter = "fftSize")] + pub fn get_fft_size(this: &AnalyserOptions) -> Option; + #[doc = "Change the `fftSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "fftSize")] - fn fft_size_shim(this: &AnalyserOptions, val: u32); + pub fn set_fft_size(this: &AnalyserOptions, val: u32); + #[doc = "Get the `maxDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[wasm_bindgen(method, getter = "maxDecibels")] + pub fn get_max_decibels(this: &AnalyserOptions) -> Option; + #[doc = "Change the `maxDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "maxDecibels")] - fn max_decibels_shim(this: &AnalyserOptions, val: f64); + pub fn set_max_decibels(this: &AnalyserOptions, val: f64); + #[doc = "Get the `minDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[wasm_bindgen(method, getter = "minDecibels")] + pub fn get_min_decibels(this: &AnalyserOptions) -> Option; + #[doc = "Change the `minDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "minDecibels")] - fn min_decibels_shim(this: &AnalyserOptions, val: f64); + pub fn set_min_decibels(this: &AnalyserOptions, val: f64); + #[doc = "Get the `smoothingTimeConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[wasm_bindgen(method, getter = "smoothingTimeConstant")] + pub fn get_smoothing_time_constant(this: &AnalyserOptions) -> Option; + #[doc = "Change the `smoothingTimeConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] #[wasm_bindgen(method, setter = "smoothingTimeConstant")] - fn smoothing_time_constant_shim(this: &AnalyserOptions, val: f64); + pub fn set_smoothing_time_constant(this: &AnalyserOptions, val: f64); } impl AnalyserOptions { #[doc = "Construct a new `AnalyserOptions`."] @@ -36,55 +94,41 @@ impl AnalyserOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `fftSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_fft_size()` instead."] pub fn fft_size(&mut self, val: u32) -> &mut Self { - self.fft_size_shim(val); + self.set_fft_size(val); self } - #[doc = "Change the `maxDecibels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_max_decibels()` instead."] pub fn max_decibels(&mut self, val: f64) -> &mut Self { - self.max_decibels_shim(val); + self.set_max_decibels(val); self } - #[doc = "Change the `minDecibels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_min_decibels()` instead."] pub fn min_decibels(&mut self, val: f64) -> &mut Self { - self.min_decibels_shim(val); + self.set_min_decibels(val); self } - #[doc = "Change the `smoothingTimeConstant` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + #[deprecated = "Use `set_smoothing_time_constant()` instead."] pub fn smoothing_time_constant(&mut self, val: f64) -> &mut Self { - self.smoothing_time_constant_shim(val); + self.set_smoothing_time_constant(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationEventInit.rs b/crates/web-sys/src/features/gen_AnimationEventInit.rs index 49910c05af7..23b8e75af68 100644 --- a/crates/web-sys/src/features/gen_AnimationEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub type AnimationEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &AnimationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &AnimationEventInit, val: bool); + pub fn set_bubbles(this: &AnimationEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &AnimationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &AnimationEventInit, val: bool); + pub fn set_cancelable(this: &AnimationEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &AnimationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &AnimationEventInit, val: bool); + pub fn set_composed(this: &AnimationEventInit, val: bool); + #[doc = "Get the `animationName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "animationName")] + pub fn get_animation_name(this: &AnimationEventInit) -> Option; + #[doc = "Change the `animationName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "animationName")] - fn animation_name_shim(this: &AnimationEventInit, val: &str); + pub fn set_animation_name(this: &AnimationEventInit, val: &str); + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "elapsedTime")] + pub fn get_elapsed_time(this: &AnimationEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &AnimationEventInit, val: f32); + pub fn set_elapsed_time(this: &AnimationEventInit, val: f32); + #[doc = "Get the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[wasm_bindgen(method, getter = "pseudoElement")] + pub fn get_pseudo_element(this: &AnimationEventInit) -> Option; + #[doc = "Change the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] #[wasm_bindgen(method, setter = "pseudoElement")] - fn pseudo_element_shim(this: &AnimationEventInit, val: &str); + pub fn set_pseudo_element(this: &AnimationEventInit, val: &str); } impl AnimationEventInit { #[doc = "Construct a new `AnimationEventInit`."] @@ -32,46 +80,34 @@ impl AnimationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `animationName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_animation_name()` instead."] pub fn animation_name(&mut self, val: &str) -> &mut Self { - self.animation_name_shim(val); + self.set_animation_name(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time(val); self } - #[doc = "Change the `pseudoElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + #[deprecated = "Use `set_pseudo_element()` instead."] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { - self.pseudo_element_shim(val); + self.set_pseudo_element(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs index de0898ed513..921cefc6136 100644 --- a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub type AnimationPlaybackEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_bubbles(this: &AnimationPlaybackEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_cancelable(this: &AnimationPlaybackEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &AnimationPlaybackEventInit, val: bool); + pub fn set_composed(this: &AnimationPlaybackEventInit, val: bool); + #[doc = "Get the `currentTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[wasm_bindgen(method, getter = "currentTime")] + pub fn get_current_time(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `currentTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "currentTime")] - fn current_time_shim(this: &AnimationPlaybackEventInit, val: Option); + pub fn set_current_time(this: &AnimationPlaybackEventInit, val: Option); + #[doc = "Get the `timelineTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[wasm_bindgen(method, getter = "timelineTime")] + pub fn get_timeline_time(this: &AnimationPlaybackEventInit) -> Option; + #[doc = "Change the `timelineTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] #[wasm_bindgen(method, setter = "timelineTime")] - fn timeline_time_shim(this: &AnimationPlaybackEventInit, val: Option); + pub fn set_timeline_time(this: &AnimationPlaybackEventInit, val: Option); } impl AnimationPlaybackEventInit { #[doc = "Construct a new `AnimationPlaybackEventInit`."] @@ -30,39 +70,29 @@ impl AnimationPlaybackEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `currentTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_current_time()` instead."] pub fn current_time(&mut self, val: Option) -> &mut Self { - self.current_time_shim(val); + self.set_current_time(val); self } - #[doc = "Change the `timelineTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + #[deprecated = "Use `set_timeline_time()` instead."] pub fn timeline_time(&mut self, val: Option) -> &mut Self { - self.timeline_time_shim(val); + self.set_timeline_time(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs index 8b9e529af90..5ce5566996d 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub type AnimationPropertyDetails; + #[doc = "Get the `property` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[wasm_bindgen(method, getter = "property")] + pub fn get_property(this: &AnimationPropertyDetails) -> String; + #[doc = "Change the `property` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "property")] - fn property_shim(this: &AnimationPropertyDetails, val: &str); + pub fn set_property(this: &AnimationPropertyDetails, val: &str); + #[doc = "Get the `runningOnCompositor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[wasm_bindgen(method, getter = "runningOnCompositor")] + pub fn get_running_on_compositor(this: &AnimationPropertyDetails) -> bool; + #[doc = "Change the `runningOnCompositor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "runningOnCompositor")] - fn running_on_compositor_shim(this: &AnimationPropertyDetails, val: bool); + pub fn set_running_on_compositor(this: &AnimationPropertyDetails, val: bool); + #[doc = "Get the `values` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[wasm_bindgen(method, getter = "values")] + pub fn get_values(this: &AnimationPropertyDetails) -> ::js_sys::Array; + #[doc = "Change the `values` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "values")] - fn values_shim(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); + pub fn set_values(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `warning` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[wasm_bindgen(method, getter = "warning")] + pub fn get_warning(this: &AnimationPropertyDetails) -> Option; + #[doc = "Change the `warning` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] #[wasm_bindgen(method, setter = "warning")] - fn warning_shim(this: &AnimationPropertyDetails, val: &str); + pub fn set_warning(this: &AnimationPropertyDetails, val: &str); } impl AnimationPropertyDetails { #[doc = "Construct a new `AnimationPropertyDetails`."] @@ -35,32 +67,24 @@ impl AnimationPropertyDetails { ret.values(values); ret } - #[doc = "Change the `property` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_property()` instead."] pub fn property(&mut self, val: &str) -> &mut Self { - self.property_shim(val); + self.set_property(val); self } - #[doc = "Change the `runningOnCompositor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_running_on_compositor()` instead."] pub fn running_on_compositor(&mut self, val: bool) -> &mut Self { - self.running_on_compositor_shim(val); + self.set_running_on_compositor(val); self } - #[doc = "Change the `values` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_values()` instead."] pub fn values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.values_shim(val); + self.set_values(val); self } - #[doc = "Change the `warning` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + #[deprecated = "Use `set_warning()` instead."] pub fn warning(&mut self, val: &str) -> &mut Self { - self.warning_shim(val); + self.set_warning(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs index 28ace13608c..acb03d52d82 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs @@ -11,14 +11,47 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] pub type AnimationPropertyValueDetails; #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &AnimationPropertyValueDetails) -> CompositeOperation; + #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &AnimationPropertyValueDetails, val: CompositeOperation); + pub fn set_composite(this: &AnimationPropertyValueDetails, val: CompositeOperation); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &AnimationPropertyValueDetails) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &AnimationPropertyValueDetails, val: &str); + pub fn set_easing(this: &AnimationPropertyValueDetails, val: &str); + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &AnimationPropertyValueDetails) -> f64; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &AnimationPropertyValueDetails, val: f64); + pub fn set_offset(this: &AnimationPropertyValueDetails, val: f64); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &AnimationPropertyValueDetails) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &AnimationPropertyValueDetails, val: &str); + pub fn set_value(this: &AnimationPropertyValueDetails, val: &str); } impl AnimationPropertyValueDetails { #[cfg(feature = "CompositeOperation")] @@ -33,32 +66,24 @@ impl AnimationPropertyValueDetails { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); + self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &str) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs index 45eba715538..c09dbaeefc1 100644 --- a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs +++ b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] pub type AssignedNodesOptions; + #[doc = "Get the `flatten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] + #[wasm_bindgen(method, getter = "flatten")] + pub fn get_flatten(this: &AssignedNodesOptions) -> Option; + #[doc = "Change the `flatten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] #[wasm_bindgen(method, setter = "flatten")] - fn flatten_shim(this: &AssignedNodesOptions, val: bool); + pub fn set_flatten(this: &AssignedNodesOptions, val: bool); } impl AssignedNodesOptions { #[doc = "Construct a new `AssignedNodesOptions`."] @@ -22,11 +30,9 @@ impl AssignedNodesOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `flatten` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] + #[deprecated = "Use `set_flatten()` instead."] pub fn flatten(&mut self, val: bool) -> &mut Self { - self.flatten_shim(val); + self.set_flatten(val); self } } diff --git a/crates/web-sys/src/features/gen_AttributeNameValue.rs b/crates/web-sys/src/features/gen_AttributeNameValue.rs index 46535ab0223..9d4cff6cd3b 100644 --- a/crates/web-sys/src/features/gen_AttributeNameValue.rs +++ b/crates/web-sys/src/features/gen_AttributeNameValue.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] pub type AttributeNameValue; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &AttributeNameValue) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AttributeNameValue, val: &str); + pub fn set_name(this: &AttributeNameValue, val: &str); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &AttributeNameValue) -> String; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &AttributeNameValue, val: &str); + pub fn set_value(this: &AttributeNameValue, val: &str); } impl AttributeNameValue { #[doc = "Construct a new `AttributeNameValue`."] @@ -26,18 +42,14 @@ impl AttributeNameValue { ret.value(value); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &str) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioBufferOptions.rs b/crates/web-sys/src/features/gen_AudioBufferOptions.rs index b3f905927bf..d5bbd45fca8 100644 --- a/crates/web-sys/src/features/gen_AudioBufferOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] pub type AudioBufferOptions; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &AudioBufferOptions) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AudioBufferOptions, val: u32); + pub fn set_length(this: &AudioBufferOptions, val: u32); + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[wasm_bindgen(method, getter = "numberOfChannels")] + pub fn get_number_of_channels(this: &AudioBufferOptions) -> Option; + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioBufferOptions, val: u32); + pub fn set_number_of_channels(this: &AudioBufferOptions, val: u32); + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &AudioBufferOptions) -> f32; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioBufferOptions, val: f32); + pub fn set_sample_rate(this: &AudioBufferOptions, val: f32); } impl AudioBufferOptions { #[doc = "Construct a new `AudioBufferOptions`."] @@ -28,25 +52,19 @@ impl AudioBufferOptions { ret.sample_rate(sample_rate); ret } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs index 5da87254d67..7c470f0b5de 100644 --- a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs @@ -11,18 +11,67 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub type AudioBufferSourceOptions; #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "buffer")] + pub fn get_buffer(this: &AudioBufferSourceOptions) -> Option; + #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); + pub fn set_buffer(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "detune")] + pub fn get_detune(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &AudioBufferSourceOptions, val: f32); + pub fn set_detune(this: &AudioBufferSourceOptions, val: f32); + #[doc = "Get the `loop` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "loop")] + pub fn get_loop(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loop` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loop")] - fn loop__shim(this: &AudioBufferSourceOptions, val: bool); + pub fn set_loop(this: &AudioBufferSourceOptions, val: bool); + #[doc = "Get the `loopEnd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "loopEnd")] + pub fn get_loop_end(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loopEnd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loopEnd")] - fn loop_end_shim(this: &AudioBufferSourceOptions, val: f64); + pub fn set_loop_end(this: &AudioBufferSourceOptions, val: f64); + #[doc = "Get the `loopStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "loopStart")] + pub fn get_loop_start(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `loopStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "loopStart")] - fn loop_start_shim(this: &AudioBufferSourceOptions, val: f64); + pub fn set_loop_start(this: &AudioBufferSourceOptions, val: f64); + #[doc = "Get the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[wasm_bindgen(method, getter = "playbackRate")] + pub fn get_playback_rate(this: &AudioBufferSourceOptions) -> Option; + #[doc = "Change the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] #[wasm_bindgen(method, setter = "playbackRate")] - fn playback_rate_shim(this: &AudioBufferSourceOptions, val: f32); + pub fn set_playback_rate(this: &AudioBufferSourceOptions, val: f32); } impl AudioBufferSourceOptions { #[doc = "Construct a new `AudioBufferSourceOptions`."] @@ -34,46 +83,34 @@ impl AudioBufferSourceOptions { ret } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { - self.buffer_shim(val); + self.set_buffer(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune(val); self } - #[doc = "Change the `loop` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop()` instead."] pub fn loop_(&mut self, val: bool) -> &mut Self { - self.loop__shim(val); + self.set_loop(val); self } - #[doc = "Change the `loopEnd` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop_end()` instead."] pub fn loop_end(&mut self, val: f64) -> &mut Self { - self.loop_end_shim(val); + self.set_loop_end(val); self } - #[doc = "Change the `loopStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_loop_start()` instead."] pub fn loop_start(&mut self, val: f64) -> &mut Self { - self.loop_start_shim(val); + self.set_loop_start(val); self } - #[doc = "Change the `playbackRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + #[deprecated = "Use `set_playback_rate()` instead."] pub fn playback_rate(&mut self, val: f32) -> &mut Self { - self.playback_rate_shim(val); + self.set_playback_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioConfiguration.rs b/crates/web-sys/src/features/gen_AudioConfiguration.rs index 058667594ce..decab4a0fef 100644 --- a/crates/web-sys/src/features/gen_AudioConfiguration.rs +++ b/crates/web-sys/src/features/gen_AudioConfiguration.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub type AudioConfiguration; + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[wasm_bindgen(method, getter = "bitrate")] + pub fn get_bitrate(this: &AudioConfiguration) -> Option; + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &AudioConfiguration, val: f64); + pub fn set_bitrate(this: &AudioConfiguration, val: f64); + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[wasm_bindgen(method, getter = "channels")] + pub fn get_channels(this: &AudioConfiguration) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &AudioConfiguration, val: &str); + pub fn set_channels(this: &AudioConfiguration, val: &str); + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[wasm_bindgen(method, getter = "contentType")] + pub fn get_content_type(this: &AudioConfiguration) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &AudioConfiguration, val: &str); + pub fn set_content_type(this: &AudioConfiguration, val: &str); + #[doc = "Get the `samplerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[wasm_bindgen(method, getter = "samplerate")] + pub fn get_samplerate(this: &AudioConfiguration) -> Option; + #[doc = "Change the `samplerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] #[wasm_bindgen(method, setter = "samplerate")] - fn samplerate_shim(this: &AudioConfiguration, val: u32); + pub fn set_samplerate(this: &AudioConfiguration, val: u32); } impl AudioConfiguration { #[doc = "Construct a new `AudioConfiguration`."] @@ -28,32 +60,24 @@ impl AudioConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate(val); self } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: &str) -> &mut Self { - self.channels_shim(val); + self.set_channels(val); self } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type(val); self } - #[doc = "Change the `samplerate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + #[deprecated = "Use `set_samplerate()` instead."] pub fn samplerate(&mut self, val: u32) -> &mut Self { - self.samplerate_shim(val); + self.set_samplerate(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioContextOptions.rs b/crates/web-sys/src/features/gen_AudioContextOptions.rs index 85b9ffaa010..1ca0ae1e9f8 100644 --- a/crates/web-sys/src/features/gen_AudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_AudioContextOptions.rs @@ -10,12 +10,44 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] pub type AudioContextOptions; + #[doc = "Get the `latencyHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[wasm_bindgen(method, getter = "latencyHint")] + pub fn get_latency_hint(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `latencyHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, setter = "latencyHint")] - fn latency_hint_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + pub fn set_latency_hint(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &AudioContextOptions) -> Option; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioContextOptions, val: f32); + pub fn set_sample_rate(this: &AudioContextOptions, val: f32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sinkId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sinkId")] + pub fn get_sink_id(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sinkId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sinkId")] - fn sink_id_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + pub fn set_sink_id(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); } impl AudioContextOptions { #[doc = "Construct a new `AudioContextOptions`."] @@ -26,29 +58,20 @@ impl AudioContextOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `latencyHint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[deprecated = "Use `set_latency_hint()` instead."] pub fn latency_hint(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.latency_hint_shim(val); + self.set_latency_hint(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sinkId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sink_id()` instead."] pub fn sink_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.sink_id_shim(val); + self.set_sink_id(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs index b7fb5f2426a..bf135f78eb8 100644 --- a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs @@ -14,30 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDataCopyToOptions; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] - #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &AudioDataCopyToOptions, val: AudioSampleFormat); - #[wasm_bindgen(method, setter = "frameCount")] - fn frame_count_shim(this: &AudioDataCopyToOptions, val: u32); - #[wasm_bindgen(method, setter = "frameOffset")] - fn frame_offset_shim(this: &AudioDataCopyToOptions, val: u32); - #[wasm_bindgen(method, setter = "planeIndex")] - fn plane_index_shim(this: &AudioDataCopyToOptions, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl AudioDataCopyToOptions { - #[doc = "Construct a new `AudioDataCopyToOptions`."] + #[doc = "Get the `format` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(plane_index: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.plane_index(plane_index); - ret - } + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &AudioDataCopyToOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] #[doc = "Change the `format` field of this object."] @@ -46,10 +32,17 @@ impl AudioDataCopyToOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { - self.format_shim(val); - self - } + #[wasm_bindgen(method, setter = "format")] + pub fn set_format(this: &AudioDataCopyToOptions, val: AudioSampleFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frameCount")] + pub fn get_frame_count(this: &AudioDataCopyToOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `frameCount` field of this object."] #[doc = ""] @@ -57,10 +50,17 @@ impl AudioDataCopyToOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn frame_count(&mut self, val: u32) -> &mut Self { - self.frame_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "frameCount")] + pub fn set_frame_count(this: &AudioDataCopyToOptions, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frameOffset")] + pub fn get_frame_offset(this: &AudioDataCopyToOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `frameOffset` field of this object."] #[doc = ""] @@ -68,10 +68,17 @@ impl AudioDataCopyToOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn frame_offset(&mut self, val: u32) -> &mut Self { - self.frame_offset_shim(val); - self - } + #[wasm_bindgen(method, setter = "frameOffset")] + pub fn set_frame_offset(this: &AudioDataCopyToOptions, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `planeIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "planeIndex")] + pub fn get_plane_index(this: &AudioDataCopyToOptions) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `planeIndex` field of this object."] #[doc = ""] @@ -79,8 +86,46 @@ impl AudioDataCopyToOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "planeIndex")] + pub fn set_plane_index(this: &AudioDataCopyToOptions, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl AudioDataCopyToOptions { + #[doc = "Construct a new `AudioDataCopyToOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(plane_index: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.plane_index(plane_index); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + #[deprecated = "Use `set_format()` instead."] + pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { + self.set_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_frame_count()` instead."] + pub fn frame_count(&mut self, val: u32) -> &mut Self { + self.set_frame_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_frame_offset()` instead."] + pub fn frame_offset(&mut self, val: u32) -> &mut Self { + self.set_frame_offset(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_plane_index()` instead."] pub fn plane_index(&mut self, val: u32) -> &mut Self { - self.plane_index_shim(val); + self.set_plane_index(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDataInit.rs b/crates/web-sys/src/features/gen_AudioDataInit.rs index 88afffc7932..29ea0c0183d 100644 --- a/crates/web-sys/src/features/gen_AudioDataInit.rs +++ b/crates/web-sys/src/features/gen_AudioDataInit.rs @@ -14,19 +14,116 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDataInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &AudioDataInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &AudioDataInit, val: &::js_sys::Object); + pub fn set_data(this: &AudioDataInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &AudioDataInit) -> AudioSampleFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &AudioDataInit, val: AudioSampleFormat); + pub fn set_format(this: &AudioDataInit, val: AudioSampleFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numberOfChannels")] + pub fn get_number_of_channels(this: &AudioDataInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioDataInit, val: u32); + pub fn set_number_of_channels(this: &AudioDataInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numberOfFrames")] + pub fn get_number_of_frames(this: &AudioDataInit) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfFrames")] - fn number_of_frames_shim(this: &AudioDataInit, val: u32); + pub fn set_number_of_frames(this: &AudioDataInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &AudioDataInit) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioDataInit, val: f32); + pub fn set_sample_rate(this: &AudioDataInit, val: f32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &AudioDataInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &AudioDataInit, val: f64); + pub fn set_timestamp(this: &AudioDataInit, val: f64); } #[cfg(web_sys_unstable_apis)] impl AudioDataInit { @@ -56,70 +153,40 @@ impl AudioDataInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSampleFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { - self.format_shim(val); + self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfFrames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_frames()` instead."] pub fn number_of_frames(&mut self, val: u32) -> &mut Self { - self.number_of_frames_shim(val); + self.set_number_of_frames(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs index 561f6c58664..7b4c8eddb02 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs @@ -14,14 +14,78 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderConfig; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codec")] + pub fn get_codec(this: &AudioDecoderConfig) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &AudioDecoderConfig, val: &str); + pub fn set_codec(this: &AudioDecoderConfig, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &AudioDecoderConfig) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &AudioDecoderConfig, val: &::js_sys::Object); + pub fn set_description(this: &AudioDecoderConfig, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numberOfChannels")] + pub fn get_number_of_channels(this: &AudioDecoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioDecoderConfig, val: u32); + pub fn set_number_of_channels(this: &AudioDecoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &AudioDecoderConfig) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioDecoderConfig, val: u32); + pub fn set_sample_rate(this: &AudioDecoderConfig, val: u32); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderConfig { @@ -40,47 +104,27 @@ impl AudioDecoderConfig { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { - self.description_shim(val); + self.set_description(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: u32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderInit.rs b/crates/web-sys/src/features/gen_AudioDecoderInit.rs index 927ec60a7f9..54a467b8bf4 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &AudioDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &AudioDecoderInit, val: &::js_sys::Function); + pub fn set_error(this: &AudioDecoderInit, val: &::js_sys::Function); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "output")] + pub fn get_output(this: &AudioDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &AudioDecoderInit, val: &::js_sys::Function); + pub fn set_output(this: &AudioDecoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderInit { @@ -35,25 +67,15 @@ impl AudioDecoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs index ecbbc3eed95..eb1a3fa72cc 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderSupport; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "config")] + pub fn get_config(this: &AudioDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &AudioDecoderSupport, val: &AudioDecoderConfig); + pub fn set_config(this: &AudioDecoderSupport, val: &AudioDecoderConfig); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "supported")] + pub fn get_supported(this: &AudioDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &AudioDecoderSupport, val: bool); + pub fn set_supported(this: &AudioDecoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl AudioDecoderSupport { @@ -35,25 +68,15 @@ impl AudioDecoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &AudioDecoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs index a21f98ad4da..4e15edfcb1a 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs @@ -14,29 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderConfig; - #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &AudioEncoderConfig, val: f64); - #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &AudioEncoderConfig, val: &str); - #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioEncoderConfig, val: u32); - #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioEncoderConfig, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl AudioEncoderConfig { - #[doc = "Construct a new `AudioEncoderConfig`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bitrate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(codec: &str) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); - ret - } + #[wasm_bindgen(method, getter = "bitrate")] + pub fn get_bitrate(this: &AudioEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bitrate` field of this object."] #[doc = ""] @@ -44,10 +30,17 @@ impl AudioEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); - self - } + #[wasm_bindgen(method, setter = "bitrate")] + pub fn set_bitrate(this: &AudioEncoderConfig, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codec")] + pub fn get_codec(this: &AudioEncoderConfig) -> String; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codec` field of this object."] #[doc = ""] @@ -55,10 +48,17 @@ impl AudioEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); - self - } + #[wasm_bindgen(method, setter = "codec")] + pub fn set_codec(this: &AudioEncoderConfig, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numberOfChannels")] + pub fn get_number_of_channels(this: &AudioEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `numberOfChannels` field of this object."] #[doc = ""] @@ -66,10 +66,17 @@ impl AudioEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); - self - } + #[wasm_bindgen(method, setter = "numberOfChannels")] + pub fn set_number_of_channels(this: &AudioEncoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &AudioEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `sampleRate` field of this object."] #[doc = ""] @@ -77,8 +84,45 @@ impl AudioEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "sampleRate")] + pub fn set_sample_rate(this: &AudioEncoderConfig, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl AudioEncoderConfig { + #[doc = "Construct a new `AudioEncoderConfig`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(codec: &str) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.codec(codec); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bitrate()` instead."] + pub fn bitrate(&mut self, val: f64) -> &mut Self { + self.set_bitrate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_codec()` instead."] + pub fn codec(&mut self, val: &str) -> &mut Self { + self.set_codec(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_number_of_channels()` instead."] + pub fn number_of_channels(&mut self, val: u32) -> &mut Self { + self.set_number_of_channels(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: u32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderInit.rs b/crates/web-sys/src/features/gen_AudioEncoderInit.rs index 52bae3763d0..95ee7e292c9 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &AudioEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &AudioEncoderInit, val: &::js_sys::Function); + pub fn set_error(this: &AudioEncoderInit, val: &::js_sys::Function); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "output")] + pub fn get_output(this: &AudioEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &AudioEncoderInit, val: &::js_sys::Function); + pub fn set_output(this: &AudioEncoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl AudioEncoderInit { @@ -35,25 +67,15 @@ impl AudioEncoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs index c19fad1e944..20399d86524 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderSupport; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioEncoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "config")] + pub fn get_config(this: &AudioEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioEncoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &AudioEncoderSupport, val: &AudioEncoderConfig); + pub fn set_config(this: &AudioEncoderSupport, val: &AudioEncoderConfig); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "supported")] + pub fn get_supported(this: &AudioEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &AudioEncoderSupport, val: bool); + pub fn set_supported(this: &AudioEncoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl AudioEncoderSupport { @@ -35,25 +68,15 @@ impl AudioEncoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioEncoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &AudioEncoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioNodeOptions.rs b/crates/web-sys/src/features/gen_AudioNodeOptions.rs index a5baf5de084..84c6ab32872 100644 --- a/crates/web-sys/src/features/gen_AudioNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioNodeOptions.rs @@ -10,14 +10,40 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] pub type AudioNodeOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &AudioNodeOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AudioNodeOptions, val: u32); + pub fn set_channel_count(this: &AudioNodeOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &AudioNodeOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AudioNodeOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AudioNodeOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &AudioNodeOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AudioNodeOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AudioNodeOptions, val: ChannelInterpretation); } impl AudioNodeOptions { #[doc = "Construct a new `AudioNodeOptions`."] @@ -28,27 +54,21 @@ impl AudioNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioSinkOptions.rs b/crates/web-sys/src/features/gen_AudioSinkOptions.rs index 666dd222b52..6918a4c0587 100644 --- a/crates/web-sys/src/features/gen_AudioSinkOptions.rs +++ b/crates/web-sys/src/features/gen_AudioSinkOptions.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioSinkOptions; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSinkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &AudioSinkOptions) -> AudioSinkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSinkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &AudioSinkOptions, val: AudioSinkType); + pub fn set_type(this: &AudioSinkOptions, val: AudioSinkType); } #[cfg(web_sys_unstable_apis)] impl AudioSinkOptions { @@ -35,14 +52,9 @@ impl AudioSinkOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioSinkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: AudioSinkType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs index 4d683ce3c00..82c717bde6b 100644 --- a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs @@ -10,22 +10,82 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub type AudioWorkletNodeOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_channel_count(this: &AudioWorkletNodeOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &AudioWorkletNodeOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AudioWorkletNodeOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &AudioWorkletNodeOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation( + this: &AudioWorkletNodeOptions, + ) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); + #[doc = "Get the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[wasm_bindgen(method, getter = "numberOfInputs")] + pub fn get_number_of_inputs(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "numberOfInputs")] - fn number_of_inputs_shim(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_number_of_inputs(this: &AudioWorkletNodeOptions, val: u32); + #[doc = "Get the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[wasm_bindgen(method, getter = "numberOfOutputs")] + pub fn get_number_of_outputs(this: &AudioWorkletNodeOptions) -> Option; + #[doc = "Change the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn number_of_outputs_shim(this: &AudioWorkletNodeOptions, val: u32); + pub fn set_number_of_outputs(this: &AudioWorkletNodeOptions, val: u32); + #[doc = "Get the `outputChannelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[wasm_bindgen(method, getter = "outputChannelCount")] + pub fn get_output_channel_count(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `outputChannelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "outputChannelCount")] - fn output_channel_count_shim(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); + pub fn set_output_channel_count(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `processorOptions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[wasm_bindgen(method, getter = "processorOptions")] + pub fn get_processor_options(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Object>; + #[doc = "Change the `processorOptions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] #[wasm_bindgen(method, setter = "processorOptions")] - fn processor_options_shim(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); + pub fn set_processor_options(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); } impl AudioWorkletNodeOptions { #[doc = "Construct a new `AudioWorkletNodeOptions`."] @@ -36,55 +96,41 @@ impl AudioWorkletNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfInputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_number_of_inputs()` instead."] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { - self.number_of_inputs_shim(val); + self.set_number_of_inputs(val); self } - #[doc = "Change the `numberOfOutputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_number_of_outputs()` instead."] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { - self.number_of_outputs_shim(val); + self.set_number_of_outputs(val); self } - #[doc = "Change the `outputChannelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_output_channel_count()` instead."] pub fn output_channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.output_channel_count_shim(val); + self.set_output_channel_count(val); self } - #[doc = "Change the `processorOptions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + #[deprecated = "Use `set_processor_options()` instead."] pub fn processor_options(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.processor_options_shim(val); + self.set_processor_options(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs index 954af0d7237..1439f6b4d5d 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] pub type AuthenticationExtensionsClientInputs; + #[doc = "Get the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] + #[wasm_bindgen(method, getter = "appid")] + pub fn get_appid(this: &AuthenticationExtensionsClientInputs) -> Option; + #[doc = "Change the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] #[wasm_bindgen(method, setter = "appid")] - fn appid_shim(this: &AuthenticationExtensionsClientInputs, val: &str); + pub fn set_appid(this: &AuthenticationExtensionsClientInputs, val: &str); } impl AuthenticationExtensionsClientInputs { #[doc = "Construct a new `AuthenticationExtensionsClientInputs`."] @@ -22,11 +30,9 @@ impl AuthenticationExtensionsClientInputs { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] + #[deprecated = "Use `set_appid()` instead."] pub fn appid(&mut self, val: &str) -> &mut Self { - self.appid_shim(val); + self.set_appid(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs index 9b63b43d5df..46cfeb952c9 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] pub type AuthenticationExtensionsClientOutputs; + #[doc = "Get the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] + #[wasm_bindgen(method, getter = "appid")] + pub fn get_appid(this: &AuthenticationExtensionsClientOutputs) -> Option; + #[doc = "Change the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] #[wasm_bindgen(method, setter = "appid")] - fn appid_shim(this: &AuthenticationExtensionsClientOutputs, val: bool); + pub fn set_appid(this: &AuthenticationExtensionsClientOutputs, val: bool); } impl AuthenticationExtensionsClientOutputs { #[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."] @@ -22,11 +30,9 @@ impl AuthenticationExtensionsClientOutputs { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] + #[deprecated = "Use `set_appid()` instead."] pub fn appid(&mut self, val: bool) -> &mut Self { - self.appid_shim(val); + self.set_appid(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs index 4ebf1beed46..cd8f0e36453 100644 --- a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs +++ b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs @@ -11,16 +11,46 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] pub type AuthenticatorSelectionCriteria; #[cfg(feature = "AuthenticatorAttachment")] + #[doc = "Get the `authenticatorAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] + #[wasm_bindgen(method, getter = "authenticatorAttachment")] + pub fn get_authenticator_attachment( + this: &AuthenticatorSelectionCriteria, + ) -> Option; + #[cfg(feature = "AuthenticatorAttachment")] + #[doc = "Change the `authenticatorAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] #[wasm_bindgen(method, setter = "authenticatorAttachment")] - fn authenticator_attachment_shim( + pub fn set_authenticator_attachment( this: &AuthenticatorSelectionCriteria, val: AuthenticatorAttachment, ); + #[doc = "Get the `requireResidentKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] + #[wasm_bindgen(method, getter = "requireResidentKey")] + pub fn get_require_resident_key(this: &AuthenticatorSelectionCriteria) -> Option; + #[doc = "Change the `requireResidentKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] #[wasm_bindgen(method, setter = "requireResidentKey")] - fn require_resident_key_shim(this: &AuthenticatorSelectionCriteria, val: bool); + pub fn set_require_resident_key(this: &AuthenticatorSelectionCriteria, val: bool); + #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Get the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] + #[wasm_bindgen(method, getter = "userVerification")] + pub fn get_user_verification( + this: &AuthenticatorSelectionCriteria, + ) -> Option; #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Change the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] #[wasm_bindgen(method, setter = "userVerification")] - fn user_verification_shim( + pub fn set_user_verification( this: &AuthenticatorSelectionCriteria, val: UserVerificationRequirement, ); @@ -35,26 +65,20 @@ impl AuthenticatorSelectionCriteria { ret } #[cfg(feature = "AuthenticatorAttachment")] - #[doc = "Change the `authenticatorAttachment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] + #[deprecated = "Use `set_authenticator_attachment()` instead."] pub fn authenticator_attachment(&mut self, val: AuthenticatorAttachment) -> &mut Self { - self.authenticator_attachment_shim(val); + self.set_authenticator_attachment(val); self } - #[doc = "Change the `requireResidentKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] + #[deprecated = "Use `set_require_resident_key()` instead."] pub fn require_resident_key(&mut self, val: bool) -> &mut Self { - self.require_resident_key_shim(val); + self.set_require_resident_key(val); self } #[cfg(feature = "UserVerificationRequirement")] - #[doc = "Change the `userVerification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] + #[deprecated = "Use `set_user_verification()` instead."] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { - self.user_verification_shim(val); + self.set_user_verification(val); self } } diff --git a/crates/web-sys/src/features/gen_AutocompleteInfo.rs b/crates/web-sys/src/features/gen_AutocompleteInfo.rs index fbc62528fb1..a1da9bb5b11 100644 --- a/crates/web-sys/src/features/gen_AutocompleteInfo.rs +++ b/crates/web-sys/src/features/gen_AutocompleteInfo.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub type AutocompleteInfo; + #[doc = "Get the `addressType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[wasm_bindgen(method, getter = "addressType")] + pub fn get_address_type(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `addressType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "addressType")] - fn address_type_shim(this: &AutocompleteInfo, val: &str); + pub fn set_address_type(this: &AutocompleteInfo, val: &str); + #[doc = "Get the `contactType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[wasm_bindgen(method, getter = "contactType")] + pub fn get_contact_type(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `contactType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "contactType")] - fn contact_type_shim(this: &AutocompleteInfo, val: &str); + pub fn set_contact_type(this: &AutocompleteInfo, val: &str); + #[doc = "Get the `fieldName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[wasm_bindgen(method, getter = "fieldName")] + pub fn get_field_name(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `fieldName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "fieldName")] - fn field_name_shim(this: &AutocompleteInfo, val: &str); + pub fn set_field_name(this: &AutocompleteInfo, val: &str); + #[doc = "Get the `section` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[wasm_bindgen(method, getter = "section")] + pub fn get_section(this: &AutocompleteInfo) -> Option; + #[doc = "Change the `section` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] #[wasm_bindgen(method, setter = "section")] - fn section_shim(this: &AutocompleteInfo, val: &str); + pub fn set_section(this: &AutocompleteInfo, val: &str); } impl AutocompleteInfo { #[doc = "Construct a new `AutocompleteInfo`."] @@ -28,32 +60,24 @@ impl AutocompleteInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `addressType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_address_type()` instead."] pub fn address_type(&mut self, val: &str) -> &mut Self { - self.address_type_shim(val); + self.set_address_type(val); self } - #[doc = "Change the `contactType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_contact_type()` instead."] pub fn contact_type(&mut self, val: &str) -> &mut Self { - self.contact_type_shim(val); + self.set_contact_type(val); self } - #[doc = "Change the `fieldName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_field_name()` instead."] pub fn field_name(&mut self, val: &str) -> &mut Self { - self.field_name_shim(val); + self.set_field_name(val); self } - #[doc = "Change the `section` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + #[deprecated = "Use `set_section()` instead."] pub fn section(&mut self, val: &str) -> &mut Self { - self.section_shim(val); + self.set_section(val); self } } diff --git a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs index 073a7138836..8626547052e 100644 --- a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs @@ -11,16 +11,57 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub type BaseComputedKeyframe; #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &BaseComputedKeyframe) -> Option; + #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BaseComputedKeyframe, val: Option); + pub fn set_composite(this: &BaseComputedKeyframe, val: Option); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BaseComputedKeyframe, val: &str); + pub fn set_easing(this: &BaseComputedKeyframe, val: &str); + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BaseComputedKeyframe, val: Option); + pub fn set_offset(this: &BaseComputedKeyframe, val: Option); + #[doc = "Get the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] + pub fn get_simulate_compute_values_failure(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn simulate_compute_values_failure_shim(this: &BaseComputedKeyframe, val: bool); + pub fn set_simulate_compute_values_failure(this: &BaseComputedKeyframe, val: bool); + #[doc = "Get the `computedOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[wasm_bindgen(method, getter = "computedOffset")] + pub fn get_computed_offset(this: &BaseComputedKeyframe) -> Option; + #[doc = "Change the `computedOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] #[wasm_bindgen(method, setter = "computedOffset")] - fn computed_offset_shim(this: &BaseComputedKeyframe, val: f64); + pub fn set_computed_offset(this: &BaseComputedKeyframe, val: f64); } impl BaseComputedKeyframe { #[doc = "Construct a new `BaseComputedKeyframe`."] @@ -32,39 +73,29 @@ impl BaseComputedKeyframe { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: Option) -> &mut Self { - self.composite_shim(val); + self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: Option) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } - #[doc = "Change the `simulateComputeValuesFailure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_simulate_compute_values_failure()` instead."] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { - self.simulate_compute_values_failure_shim(val); + self.set_simulate_compute_values_failure(val); self } - #[doc = "Change the `computedOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + #[deprecated = "Use `set_computed_offset()` instead."] pub fn computed_offset(&mut self, val: f64) -> &mut Self { - self.computed_offset_shim(val); + self.set_computed_offset(val); self } } diff --git a/crates/web-sys/src/features/gen_BaseKeyframe.rs b/crates/web-sys/src/features/gen_BaseKeyframe.rs index 0c2f97da2aa..1c37af7631c 100644 --- a/crates/web-sys/src/features/gen_BaseKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseKeyframe.rs @@ -11,14 +11,47 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] pub type BaseKeyframe; #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &BaseKeyframe) -> Option; + #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BaseKeyframe, val: Option); + pub fn set_composite(this: &BaseKeyframe, val: Option); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &BaseKeyframe) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BaseKeyframe, val: &str); + pub fn set_easing(this: &BaseKeyframe, val: &str); + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &BaseKeyframe) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BaseKeyframe, val: Option); + pub fn set_offset(this: &BaseKeyframe, val: Option); + #[doc = "Get the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] + pub fn get_simulate_compute_values_failure(this: &BaseKeyframe) -> Option; + #[doc = "Change the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn simulate_compute_values_failure_shim(this: &BaseKeyframe, val: bool); + pub fn set_simulate_compute_values_failure(this: &BaseKeyframe, val: bool); } impl BaseKeyframe { #[doc = "Construct a new `BaseKeyframe`."] @@ -30,32 +63,24 @@ impl BaseKeyframe { ret } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: Option) -> &mut Self { - self.composite_shim(val); + self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: Option) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } - #[doc = "Change the `simulateComputeValuesFailure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + #[deprecated = "Use `set_simulate_compute_values_failure()` instead."] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { - self.simulate_compute_values_failure_shim(val); + self.set_simulate_compute_values_failure(val); self } } diff --git a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs index d2dfb18f80e..fa9aa466833 100644 --- a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] pub type BasePropertyIndexedKeyframe; + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_composite(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_easing(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + pub fn set_offset(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); } impl BasePropertyIndexedKeyframe { #[doc = "Construct a new `BasePropertyIndexedKeyframe`."] @@ -26,25 +50,19 @@ impl BasePropertyIndexedKeyframe { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.composite_shim(val); + self.set_composite(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } } diff --git a/crates/web-sys/src/features/gen_BasicCardRequest.rs b/crates/web-sys/src/features/gen_BasicCardRequest.rs index 4509a71d546..ad2ad22c758 100644 --- a/crates/web-sys/src/features/gen_BasicCardRequest.rs +++ b/crates/web-sys/src/features/gen_BasicCardRequest.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] pub type BasicCardRequest; + #[doc = "Get the `supportedNetworks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[wasm_bindgen(method, getter = "supportedNetworks")] + pub fn get_supported_networks(this: &BasicCardRequest) -> Option<::js_sys::Array>; + #[doc = "Change the `supportedNetworks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, setter = "supportedNetworks")] - fn supported_networks_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + pub fn set_supported_networks(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `supportedTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[wasm_bindgen(method, getter = "supportedTypes")] + pub fn get_supported_types(this: &BasicCardRequest) -> Option<::js_sys::Array>; + #[doc = "Change the `supportedTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] #[wasm_bindgen(method, setter = "supportedTypes")] - fn supported_types_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + pub fn set_supported_types(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); } impl BasicCardRequest { #[doc = "Construct a new `BasicCardRequest`."] @@ -24,18 +40,14 @@ impl BasicCardRequest { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `supportedNetworks` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[deprecated = "Use `set_supported_networks()` instead."] pub fn supported_networks(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.supported_networks_shim(val); + self.set_supported_networks(val); self } - #[doc = "Change the `supportedTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + #[deprecated = "Use `set_supported_types()` instead."] pub fn supported_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.supported_types_shim(val); + self.set_supported_types(val); self } } diff --git a/crates/web-sys/src/features/gen_BasicCardResponse.rs b/crates/web-sys/src/features/gen_BasicCardResponse.rs index bafff97512c..b5fff5306b0 100644 --- a/crates/web-sys/src/features/gen_BasicCardResponse.rs +++ b/crates/web-sys/src/features/gen_BasicCardResponse.rs @@ -11,18 +11,67 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub type BasicCardResponse; #[cfg(feature = "PaymentAddress")] + #[doc = "Get the `billingAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] + #[wasm_bindgen(method, getter = "billingAddress")] + pub fn get_billing_address(this: &BasicCardResponse) -> Option; + #[cfg(feature = "PaymentAddress")] + #[doc = "Change the `billingAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] #[wasm_bindgen(method, setter = "billingAddress")] - fn billing_address_shim(this: &BasicCardResponse, val: Option<&PaymentAddress>); + pub fn set_billing_address(this: &BasicCardResponse, val: Option<&PaymentAddress>); + #[doc = "Get the `cardNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[wasm_bindgen(method, getter = "cardNumber")] + pub fn get_card_number(this: &BasicCardResponse) -> String; + #[doc = "Change the `cardNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardNumber")] - fn card_number_shim(this: &BasicCardResponse, val: &str); + pub fn set_card_number(this: &BasicCardResponse, val: &str); + #[doc = "Get the `cardSecurityCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[wasm_bindgen(method, getter = "cardSecurityCode")] + pub fn get_card_security_code(this: &BasicCardResponse) -> Option; + #[doc = "Change the `cardSecurityCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardSecurityCode")] - fn card_security_code_shim(this: &BasicCardResponse, val: &str); + pub fn set_card_security_code(this: &BasicCardResponse, val: &str); + #[doc = "Get the `cardholderName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[wasm_bindgen(method, getter = "cardholderName")] + pub fn get_cardholder_name(this: &BasicCardResponse) -> Option; + #[doc = "Change the `cardholderName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "cardholderName")] - fn cardholder_name_shim(this: &BasicCardResponse, val: &str); + pub fn set_cardholder_name(this: &BasicCardResponse, val: &str); + #[doc = "Get the `expiryMonth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[wasm_bindgen(method, getter = "expiryMonth")] + pub fn get_expiry_month(this: &BasicCardResponse) -> Option; + #[doc = "Change the `expiryMonth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "expiryMonth")] - fn expiry_month_shim(this: &BasicCardResponse, val: &str); + pub fn set_expiry_month(this: &BasicCardResponse, val: &str); + #[doc = "Get the `expiryYear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[wasm_bindgen(method, getter = "expiryYear")] + pub fn get_expiry_year(this: &BasicCardResponse) -> Option; + #[doc = "Change the `expiryYear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] #[wasm_bindgen(method, setter = "expiryYear")] - fn expiry_year_shim(this: &BasicCardResponse, val: &str); + pub fn set_expiry_year(this: &BasicCardResponse, val: &str); } impl BasicCardResponse { #[doc = "Construct a new `BasicCardResponse`."] @@ -35,46 +84,34 @@ impl BasicCardResponse { ret } #[cfg(feature = "PaymentAddress")] - #[doc = "Change the `billingAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] + #[deprecated = "Use `set_billing_address()` instead."] pub fn billing_address(&mut self, val: Option<&PaymentAddress>) -> &mut Self { - self.billing_address_shim(val); + self.set_billing_address(val); self } - #[doc = "Change the `cardNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_card_number()` instead."] pub fn card_number(&mut self, val: &str) -> &mut Self { - self.card_number_shim(val); + self.set_card_number(val); self } - #[doc = "Change the `cardSecurityCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_card_security_code()` instead."] pub fn card_security_code(&mut self, val: &str) -> &mut Self { - self.card_security_code_shim(val); + self.set_card_security_code(val); self } - #[doc = "Change the `cardholderName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_cardholder_name()` instead."] pub fn cardholder_name(&mut self, val: &str) -> &mut Self { - self.cardholder_name_shim(val); + self.set_cardholder_name(val); self } - #[doc = "Change the `expiryMonth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_expiry_month()` instead."] pub fn expiry_month(&mut self, val: &str) -> &mut Self { - self.expiry_month_shim(val); + self.set_expiry_month(val); self } - #[doc = "Change the `expiryYear` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + #[deprecated = "Use `set_expiry_year()` instead."] pub fn expiry_year(&mut self, val: &str) -> &mut Self { - self.expiry_year_shim(val); + self.set_expiry_year(val); self } } diff --git a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs index 6a0863aa344..a1dedd02340 100644 --- a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs +++ b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs @@ -10,25 +10,92 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub type BiquadFilterOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &BiquadFilterOptions, val: u32); + pub fn set_channel_count(this: &BiquadFilterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &BiquadFilterOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &BiquadFilterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &BiquadFilterOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &BiquadFilterOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &BiquadFilterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &BiquadFilterOptions, val: ChannelInterpretation); + #[doc = "Get the `Q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[wasm_bindgen(method, getter = "Q")] + pub fn get_q(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `Q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "Q")] - fn q_shim(this: &BiquadFilterOptions, val: f32); + pub fn set_q(this: &BiquadFilterOptions, val: f32); + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[wasm_bindgen(method, getter = "detune")] + pub fn get_detune(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &BiquadFilterOptions, val: f32); + pub fn set_detune(this: &BiquadFilterOptions, val: f32); + #[doc = "Get the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[wasm_bindgen(method, getter = "frequency")] + pub fn get_frequency(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "frequency")] - fn frequency_shim(this: &BiquadFilterOptions, val: f32); + pub fn set_frequency(this: &BiquadFilterOptions, val: f32); + #[doc = "Get the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[wasm_bindgen(method, getter = "gain")] + pub fn get_gain(this: &BiquadFilterOptions) -> Option; + #[doc = "Change the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] #[wasm_bindgen(method, setter = "gain")] - fn gain_shim(this: &BiquadFilterOptions, val: f32); + pub fn set_gain(this: &BiquadFilterOptions, val: f32); #[cfg(feature = "BiquadFilterType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &BiquadFilterOptions) -> Option; + #[cfg(feature = "BiquadFilterType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &BiquadFilterOptions, val: BiquadFilterType); + pub fn set_type(this: &BiquadFilterOptions, val: BiquadFilterType); } impl BiquadFilterOptions { #[doc = "Construct a new `BiquadFilterOptions`."] @@ -39,63 +106,47 @@ impl BiquadFilterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `Q` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_q()` instead."] pub fn q(&mut self, val: f32) -> &mut Self { - self.q_shim(val); + self.set_q(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune(val); self } - #[doc = "Change the `frequency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_frequency()` instead."] pub fn frequency(&mut self, val: f32) -> &mut Self { - self.frequency_shim(val); + self.set_frequency(val); self } - #[doc = "Change the `gain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + #[deprecated = "Use `set_gain()` instead."] pub fn gain(&mut self, val: f32) -> &mut Self { - self.gain_shim(val); + self.set_gain(val); self } #[cfg(feature = "BiquadFilterType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: BiquadFilterType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_BlobEventInit.rs b/crates/web-sys/src/features/gen_BlobEventInit.rs index 0fa75a06fb3..fea2a8ed6a5 100644 --- a/crates/web-sys/src/features/gen_BlobEventInit.rs +++ b/crates/web-sys/src/features/gen_BlobEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] pub type BlobEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &BlobEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &BlobEventInit, val: bool); + pub fn set_bubbles(this: &BlobEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &BlobEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &BlobEventInit, val: bool); + pub fn set_cancelable(this: &BlobEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &BlobEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &BlobEventInit, val: bool); + pub fn set_composed(this: &BlobEventInit, val: bool); #[cfg(feature = "Blob")] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &BlobEventInit) -> Option; + #[cfg(feature = "Blob")] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &BlobEventInit, val: Option<&Blob>); + pub fn set_data(this: &BlobEventInit, val: Option<&Blob>); } impl BlobEventInit { #[doc = "Construct a new `BlobEventInit`."] @@ -29,33 +62,25 @@ impl BlobEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Blob")] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&Blob>) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } } diff --git a/crates/web-sys/src/features/gen_BlobPropertyBag.rs b/crates/web-sys/src/features/gen_BlobPropertyBag.rs index 0adf9be4ac0..c9f3853f33e 100644 --- a/crates/web-sys/src/features/gen_BlobPropertyBag.rs +++ b/crates/web-sys/src/features/gen_BlobPropertyBag.rs @@ -11,10 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] pub type BlobPropertyBag; #[cfg(feature = "EndingTypes")] + #[doc = "Get the `endings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] + #[wasm_bindgen(method, getter = "endings")] + pub fn get_endings(this: &BlobPropertyBag) -> Option; + #[cfg(feature = "EndingTypes")] + #[doc = "Change the `endings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] #[wasm_bindgen(method, setter = "endings")] - fn endings_shim(this: &BlobPropertyBag, val: EndingTypes); + pub fn set_endings(this: &BlobPropertyBag, val: EndingTypes); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &BlobPropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &BlobPropertyBag, val: &str); + pub fn set_type(this: &BlobPropertyBag, val: &str); } impl BlobPropertyBag { #[doc = "Construct a new `BlobPropertyBag`."] @@ -26,18 +43,14 @@ impl BlobPropertyBag { ret } #[cfg(feature = "EndingTypes")] - #[doc = "Change the `endings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] + #[deprecated = "Use `set_endings()` instead."] pub fn endings(&mut self, val: EndingTypes) -> &mut Self { - self.endings_shim(val); + self.set_endings(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_BlockParsingOptions.rs b/crates/web-sys/src/features/gen_BlockParsingOptions.rs index f46a8c184bc..6990d64bded 100644 --- a/crates/web-sys/src/features/gen_BlockParsingOptions.rs +++ b/crates/web-sys/src/features/gen_BlockParsingOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] pub type BlockParsingOptions; + #[doc = "Get the `blockScriptCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] + #[wasm_bindgen(method, getter = "blockScriptCreated")] + pub fn get_block_script_created(this: &BlockParsingOptions) -> Option; + #[doc = "Change the `blockScriptCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] #[wasm_bindgen(method, setter = "blockScriptCreated")] - fn block_script_created_shim(this: &BlockParsingOptions, val: bool); + pub fn set_block_script_created(this: &BlockParsingOptions, val: bool); } impl BlockParsingOptions { #[doc = "Construct a new `BlockParsingOptions`."] @@ -22,11 +30,9 @@ impl BlockParsingOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `blockScriptCreated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] + #[deprecated = "Use `set_block_script_created()` instead."] pub fn block_script_created(&mut self, val: bool) -> &mut Self { - self.block_script_created_shim(val); + self.set_block_script_created(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs index 3b357d47883..38c8e66dc5c 100644 --- a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs @@ -14,50 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothAdvertisingEventInit; - #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &BluetoothAdvertisingEventInit, val: bool); - #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &BluetoothAdvertisingEventInit, val: bool); - #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &BluetoothAdvertisingEventInit, val: bool); - #[wasm_bindgen(method, setter = "appearance")] - fn appearance_shim(this: &BluetoothAdvertisingEventInit, val: u16); - #[cfg(feature = "BluetoothDevice")] - #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); - #[cfg(feature = "BluetoothManufacturerDataMap")] - #[wasm_bindgen(method, setter = "manufacturerData")] - fn manufacturer_data_shim( - this: &BluetoothAdvertisingEventInit, - val: &BluetoothManufacturerDataMap, - ); - #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothAdvertisingEventInit, val: &str); - #[wasm_bindgen(method, setter = "rssi")] - fn rssi_shim(this: &BluetoothAdvertisingEventInit, val: i8); - #[cfg(feature = "BluetoothServiceDataMap")] - #[wasm_bindgen(method, setter = "serviceData")] - fn service_data_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); - #[wasm_bindgen(method, setter = "txPower")] - fn tx_power_shim(this: &BluetoothAdvertisingEventInit, val: i8); - #[wasm_bindgen(method, setter = "uuids")] - fn uuids_shim(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl BluetoothAdvertisingEventInit { - #[cfg(feature = "BluetoothDevice")] - #[doc = "Construct a new `BluetoothAdvertisingEventInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(device: &BluetoothDevice) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.device(device); - ret - } + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] @@ -65,10 +30,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); - self - } + #[wasm_bindgen(method, setter = "bubbles")] + pub fn set_bubbles(this: &BluetoothAdvertisingEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] @@ -76,10 +48,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); - self - } + #[wasm_bindgen(method, setter = "cancelable")] + pub fn set_cancelable(this: &BluetoothAdvertisingEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] @@ -87,10 +66,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); - self - } + #[wasm_bindgen(method, setter = "composed")] + pub fn set_composed(this: &BluetoothAdvertisingEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `appearance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "appearance")] + pub fn get_appearance(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `appearance` field of this object."] #[doc = ""] @@ -98,10 +84,18 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn appearance(&mut self, val: u16) -> &mut Self { - self.appearance_shim(val); - self - } + #[wasm_bindgen(method, setter = "appearance")] + pub fn set_appearance(this: &BluetoothAdvertisingEventInit, val: u16); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "device")] + pub fn get_device(this: &BluetoothAdvertisingEventInit) -> BluetoothDevice; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] #[doc = "Change the `device` field of this object."] @@ -110,10 +104,20 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn device(&mut self, val: &BluetoothDevice) -> &mut Self { - self.device_shim(val); - self - } + #[wasm_bindgen(method, setter = "device")] + pub fn set_device(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothManufacturerDataMap")] + #[doc = "Get the `manufacturerData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "manufacturerData")] + pub fn get_manufacturer_data( + this: &BluetoothAdvertisingEventInit, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] #[doc = "Change the `manufacturerData` field of this object."] @@ -122,10 +126,20 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn manufacturer_data(&mut self, val: &BluetoothManufacturerDataMap) -> &mut Self { - self.manufacturer_data_shim(val); - self - } + #[wasm_bindgen(method, setter = "manufacturerData")] + pub fn set_manufacturer_data( + this: &BluetoothAdvertisingEventInit, + val: &BluetoothManufacturerDataMap, + ); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `name` field of this object."] #[doc = ""] @@ -133,10 +147,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); - self - } + #[wasm_bindgen(method, setter = "name")] + pub fn set_name(this: &BluetoothAdvertisingEventInit, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rssi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "rssi")] + pub fn get_rssi(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `rssi` field of this object."] #[doc = ""] @@ -144,10 +165,20 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn rssi(&mut self, val: i8) -> &mut Self { - self.rssi_shim(val); - self - } + #[wasm_bindgen(method, setter = "rssi")] + pub fn set_rssi(this: &BluetoothAdvertisingEventInit, val: i8); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothServiceDataMap")] + #[doc = "Get the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "serviceData")] + pub fn get_service_data( + this: &BluetoothAdvertisingEventInit, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] #[doc = "Change the `serviceData` field of this object."] @@ -156,10 +187,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn service_data(&mut self, val: &BluetoothServiceDataMap) -> &mut Self { - self.service_data_shim(val); - self - } + #[wasm_bindgen(method, setter = "serviceData")] + pub fn set_service_data(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `txPower` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "txPower")] + pub fn get_tx_power(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `txPower` field of this object."] #[doc = ""] @@ -167,10 +205,17 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn tx_power(&mut self, val: i8) -> &mut Self { - self.tx_power_shim(val); - self - } + #[wasm_bindgen(method, setter = "txPower")] + pub fn set_tx_power(this: &BluetoothAdvertisingEventInit, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `uuids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "uuids")] + pub fn get_uuids(this: &BluetoothAdvertisingEventInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `uuids` field of this object."] #[doc = ""] @@ -178,8 +223,91 @@ impl BluetoothAdvertisingEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "uuids")] + pub fn set_uuids(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothAdvertisingEventInit { + #[cfg(feature = "BluetoothDevice")] + #[doc = "Construct a new `BluetoothAdvertisingEventInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(device: &BluetoothDevice) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.device(device); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bubbles()` instead."] + pub fn bubbles(&mut self, val: bool) -> &mut Self { + self.set_bubbles(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_cancelable()` instead."] + pub fn cancelable(&mut self, val: bool) -> &mut Self { + self.set_cancelable(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_composed()` instead."] + pub fn composed(&mut self, val: bool) -> &mut Self { + self.set_composed(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_appearance()` instead."] + pub fn appearance(&mut self, val: u16) -> &mut Self { + self.set_appearance(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothDevice")] + #[deprecated = "Use `set_device()` instead."] + pub fn device(&mut self, val: &BluetoothDevice) -> &mut Self { + self.set_device(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothManufacturerDataMap")] + #[deprecated = "Use `set_manufacturer_data()` instead."] + pub fn manufacturer_data(&mut self, val: &BluetoothManufacturerDataMap) -> &mut Self { + self.set_manufacturer_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_name()` instead."] + pub fn name(&mut self, val: &str) -> &mut Self { + self.set_name(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_rssi()` instead."] + pub fn rssi(&mut self, val: i8) -> &mut Self { + self.set_rssi(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothServiceDataMap")] + #[deprecated = "Use `set_service_data()` instead."] + pub fn service_data(&mut self, val: &BluetoothServiceDataMap) -> &mut Self { + self.set_service_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_tx_power()` instead."] + pub fn tx_power(&mut self, val: i8) -> &mut Self { + self.set_tx_power(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_uuids()` instead."] pub fn uuids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.uuids_shim(val); + self.set_uuids(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs index c5ced6819f6..d7ec6784356 100644 --- a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothDataFilterInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataPrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dataPrefix")] + pub fn get_data_prefix(this: &BluetoothDataFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataPrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataPrefix")] - fn data_prefix_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + pub fn set_data_prefix(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mask")] + pub fn get_mask(this: &BluetoothDataFilterInit) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + pub fn set_mask(this: &BluetoothDataFilterInit, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl BluetoothDataFilterInit { @@ -33,25 +65,15 @@ impl BluetoothDataFilterInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataPrefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_prefix()` instead."] pub fn data_prefix(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_prefix_shim(val); + self.set_data_prefix(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: &::js_sys::Object) -> &mut Self { - self.mask_shim(val); + self.set_mask(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs index e70ea5d2c1c..8f7db520c1e 100644 --- a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothLeScanFilterInit; - #[wasm_bindgen(method, setter = "manufacturerData")] - fn manufacturer_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); - #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothLeScanFilterInit, val: &str); - #[wasm_bindgen(method, setter = "namePrefix")] - fn name_prefix_shim(this: &BluetoothLeScanFilterInit, val: &str); - #[wasm_bindgen(method, setter = "serviceData")] - fn service_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); - #[wasm_bindgen(method, setter = "services")] - fn services_shim(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl BluetoothLeScanFilterInit { - #[doc = "Construct a new `BluetoothLeScanFilterInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `manufacturerData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "manufacturerData")] + pub fn get_manufacturer_data(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Object>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `manufacturerData` field of this object."] #[doc = ""] @@ -45,10 +30,17 @@ impl BluetoothLeScanFilterInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn manufacturer_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.manufacturer_data_shim(val); - self - } + #[wasm_bindgen(method, setter = "manufacturerData")] + pub fn set_manufacturer_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &BluetoothLeScanFilterInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `name` field of this object."] #[doc = ""] @@ -56,10 +48,17 @@ impl BluetoothLeScanFilterInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); - self - } + #[wasm_bindgen(method, setter = "name")] + pub fn set_name(this: &BluetoothLeScanFilterInit, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `namePrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "namePrefix")] + pub fn get_name_prefix(this: &BluetoothLeScanFilterInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `namePrefix` field of this object."] #[doc = ""] @@ -67,10 +66,17 @@ impl BluetoothLeScanFilterInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn name_prefix(&mut self, val: &str) -> &mut Self { - self.name_prefix_shim(val); - self - } + #[wasm_bindgen(method, setter = "namePrefix")] + pub fn set_name_prefix(this: &BluetoothLeScanFilterInit, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "serviceData")] + pub fn get_service_data(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Object>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `serviceData` field of this object."] #[doc = ""] @@ -78,10 +84,17 @@ impl BluetoothLeScanFilterInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn service_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.service_data_shim(val); - self - } + #[wasm_bindgen(method, setter = "serviceData")] + pub fn set_service_data(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `services` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "services")] + pub fn get_services(this: &BluetoothLeScanFilterInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `services` field of this object."] #[doc = ""] @@ -89,8 +102,50 @@ impl BluetoothLeScanFilterInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "services")] + pub fn set_services(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothLeScanFilterInit { + #[doc = "Construct a new `BluetoothLeScanFilterInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_manufacturer_data()` instead."] + pub fn manufacturer_data(&mut self, val: &::js_sys::Object) -> &mut Self { + self.set_manufacturer_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_name()` instead."] + pub fn name(&mut self, val: &str) -> &mut Self { + self.set_name(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_name_prefix()` instead."] + pub fn name_prefix(&mut self, val: &str) -> &mut Self { + self.set_name_prefix(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_service_data()` instead."] + pub fn service_data(&mut self, val: &::js_sys::Object) -> &mut Self { + self.set_service_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_services()` instead."] pub fn services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.services_shim(val); + self.set_services(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs index 3159b4567b3..61715c45bf0 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs @@ -14,33 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothPermissionDescriptor, val: PermissionName); - #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn accept_all_devices_shim(this: &BluetoothPermissionDescriptor, val: bool); - #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &BluetoothPermissionDescriptor, val: &str); - #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "optionalServices")] - fn optional_services_shim(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl BluetoothPermissionDescriptor { - #[cfg(feature = "PermissionName")] - #[doc = "Construct a new `BluetoothPermissionDescriptor`."] + #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`, `PermissionName`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(name: PermissionName) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret - } + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &BluetoothPermissionDescriptor) -> PermissionName; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] #[doc = "Change the `name` field of this object."] @@ -49,10 +32,17 @@ impl BluetoothPermissionDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); - self - } + #[wasm_bindgen(method, setter = "name")] + pub fn set_name(this: &BluetoothPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `acceptAllDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "acceptAllDevices")] + pub fn get_accept_all_devices(this: &BluetoothPermissionDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `acceptAllDevices` field of this object."] #[doc = ""] @@ -60,10 +50,17 @@ impl BluetoothPermissionDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { - self.accept_all_devices_shim(val); - self - } + #[wasm_bindgen(method, setter = "acceptAllDevices")] + pub fn set_accept_all_devices(this: &BluetoothPermissionDescriptor, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &BluetoothPermissionDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `deviceId` field of this object."] #[doc = ""] @@ -71,10 +68,17 @@ impl BluetoothPermissionDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); - self - } + #[wasm_bindgen(method, setter = "deviceId")] + pub fn set_device_id(this: &BluetoothPermissionDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &BluetoothPermissionDescriptor) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `filters` field of this object."] #[doc = ""] @@ -82,10 +86,17 @@ impl BluetoothPermissionDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); - self - } + #[wasm_bindgen(method, setter = "filters")] + pub fn set_filters(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "optionalServices")] + pub fn get_optional_services(this: &BluetoothPermissionDescriptor) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `optionalServices` field of this object."] #[doc = ""] @@ -93,8 +104,56 @@ impl BluetoothPermissionDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "optionalServices")] + pub fn set_optional_services( + this: &BluetoothPermissionDescriptor, + val: &::wasm_bindgen::JsValue, + ); +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothPermissionDescriptor { + #[cfg(feature = "PermissionName")] + #[doc = "Construct a new `BluetoothPermissionDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(name: PermissionName) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.name(name); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[deprecated = "Use `set_name()` instead."] + pub fn name(&mut self, val: PermissionName) -> &mut Self { + self.set_name(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_accept_all_devices()` instead."] + pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { + self.set_accept_all_devices(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_device_id()` instead."] + pub fn device_id(&mut self, val: &str) -> &mut Self { + self.set_device_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_filters()` instead."] + pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_filters(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_optional_services()` instead."] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_services_shim(val); + self.set_optional_services(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs index 0ef0d117cde..ba65406810e 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothPermissionStorage; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "allowedDevices")] + pub fn get_allowed_devices(this: &BluetoothPermissionStorage) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedDevices")] - fn allowed_devices_shim(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_devices(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl BluetoothPermissionStorage { @@ -32,14 +48,9 @@ impl BluetoothPermissionStorage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_devices()` instead."] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_devices_shim(val); + self.set_allowed_devices(val); self } } diff --git a/crates/web-sys/src/features/gen_BoxQuadOptions.rs b/crates/web-sys/src/features/gen_BoxQuadOptions.rs index 6000d877f7c..0a117e15c03 100644 --- a/crates/web-sys/src/features/gen_BoxQuadOptions.rs +++ b/crates/web-sys/src/features/gen_BoxQuadOptions.rs @@ -11,10 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] pub type BoxQuadOptions; #[cfg(feature = "CssBoxType")] + #[doc = "Get the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] + #[wasm_bindgen(method, getter = "box")] + pub fn get_box(this: &BoxQuadOptions) -> Option; + #[cfg(feature = "CssBoxType")] + #[doc = "Change the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "box")] - fn box__shim(this: &BoxQuadOptions, val: CssBoxType); + pub fn set_box(this: &BoxQuadOptions, val: CssBoxType); + #[doc = "Get the `relativeTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] + #[wasm_bindgen(method, getter = "relativeTo")] + pub fn get_relative_to(this: &BoxQuadOptions) -> Option<::js_sys::Object>; + #[doc = "Change the `relativeTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] #[wasm_bindgen(method, setter = "relativeTo")] - fn relative_to_shim(this: &BoxQuadOptions, val: &::js_sys::Object); + pub fn set_relative_to(this: &BoxQuadOptions, val: &::js_sys::Object); } impl BoxQuadOptions { #[doc = "Construct a new `BoxQuadOptions`."] @@ -26,18 +43,14 @@ impl BoxQuadOptions { ret } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `box` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_box()` instead."] pub fn box_(&mut self, val: CssBoxType) -> &mut Self { - self.box__shim(val); + self.set_box(val); self } - #[doc = "Change the `relativeTo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] + #[deprecated = "Use `set_relative_to()` instead."] pub fn relative_to(&mut self, val: &::js_sys::Object) -> &mut Self { - self.relative_to_shim(val); + self.set_relative_to(val); self } } diff --git a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs index 2b5f6f187b8..d41ec3553ef 100644 --- a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] pub type BrowserElementDownloadOptions; + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[wasm_bindgen(method, getter = "filename")] + pub fn get_filename(this: &BrowserElementDownloadOptions) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); + pub fn set_filename(this: &BrowserElementDownloadOptions, val: Option<&str>); + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[wasm_bindgen(method, getter = "referrer")] + pub fn get_referrer(this: &BrowserElementDownloadOptions) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); + pub fn set_referrer(this: &BrowserElementDownloadOptions, val: Option<&str>); } impl BrowserElementDownloadOptions { #[doc = "Construct a new `BrowserElementDownloadOptions`."] @@ -24,18 +40,14 @@ impl BrowserElementDownloadOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: Option<&str>) -> &mut Self { - self.filename_shim(val); + self.set_filename(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: Option<&str>) -> &mut Self { - self.referrer_shim(val); + self.set_referrer(val); self } } diff --git a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs index 8a63b96bae3..d5cb2dbd650 100644 --- a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] pub type BrowserElementExecuteScriptOptions; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &BrowserElementExecuteScriptOptions) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + pub fn set_origin(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &BrowserElementExecuteScriptOptions) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + pub fn set_url(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); } impl BrowserElementExecuteScriptOptions { #[doc = "Construct a new `BrowserElementExecuteScriptOptions`."] @@ -24,18 +40,14 @@ impl BrowserElementExecuteScriptOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: Option<&str>) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: Option<&str>) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } } diff --git a/crates/web-sys/src/features/gen_CacheBatchOperation.rs b/crates/web-sys/src/features/gen_CacheBatchOperation.rs index 706019c1794..3712535a7b8 100644 --- a/crates/web-sys/src/features/gen_CacheBatchOperation.rs +++ b/crates/web-sys/src/features/gen_CacheBatchOperation.rs @@ -11,16 +11,51 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] pub type CacheBatchOperation; #[cfg(feature = "CacheQueryOptions")] + #[doc = "Get the `options` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] + #[wasm_bindgen(method, getter = "options")] + pub fn get_options(this: &CacheBatchOperation) -> Option; + #[cfg(feature = "CacheQueryOptions")] + #[doc = "Change the `options` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "options")] - fn options_shim(this: &CacheBatchOperation, val: &CacheQueryOptions); + pub fn set_options(this: &CacheBatchOperation, val: &CacheQueryOptions); + #[cfg(feature = "Request")] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] + #[wasm_bindgen(method, getter = "request")] + pub fn get_request(this: &CacheBatchOperation) -> Option; #[cfg(feature = "Request")] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &CacheBatchOperation, val: &Request); + pub fn set_request(this: &CacheBatchOperation, val: &Request); #[cfg(feature = "Response")] + #[doc = "Get the `response` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] + #[wasm_bindgen(method, getter = "response")] + pub fn get_response(this: &CacheBatchOperation) -> Option; + #[cfg(feature = "Response")] + #[doc = "Change the `response` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] #[wasm_bindgen(method, setter = "response")] - fn response_shim(this: &CacheBatchOperation, val: &Response); + pub fn set_response(this: &CacheBatchOperation, val: &Response); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &CacheBatchOperation) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &CacheBatchOperation, val: &str); + pub fn set_type(this: &CacheBatchOperation, val: &str); } impl CacheBatchOperation { #[doc = "Construct a new `CacheBatchOperation`."] @@ -32,34 +67,26 @@ impl CacheBatchOperation { ret } #[cfg(feature = "CacheQueryOptions")] - #[doc = "Change the `options` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] + #[deprecated = "Use `set_options()` instead."] pub fn options(&mut self, val: &CacheQueryOptions) -> &mut Self { - self.options_shim(val); + self.set_options(val); self } #[cfg(feature = "Request")] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: &Request) -> &mut Self { - self.request_shim(val); + self.set_request(val); self } #[cfg(feature = "Response")] - #[doc = "Change the `response` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] + #[deprecated = "Use `set_response()` instead."] pub fn response(&mut self, val: &Response) -> &mut Self { - self.response_shim(val); + self.set_response(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_CacheQueryOptions.rs b/crates/web-sys/src/features/gen_CacheQueryOptions.rs index f7b0bdf77e8..3497a49e5f8 100644 --- a/crates/web-sys/src/features/gen_CacheQueryOptions.rs +++ b/crates/web-sys/src/features/gen_CacheQueryOptions.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub type CacheQueryOptions; + #[doc = "Get the `cacheName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[wasm_bindgen(method, getter = "cacheName")] + pub fn get_cache_name(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `cacheName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "cacheName")] - fn cache_name_shim(this: &CacheQueryOptions, val: &str); + pub fn set_cache_name(this: &CacheQueryOptions, val: &str); + #[doc = "Get the `ignoreMethod` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[wasm_bindgen(method, getter = "ignoreMethod")] + pub fn get_ignore_method(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreMethod` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreMethod")] - fn ignore_method_shim(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_method(this: &CacheQueryOptions, val: bool); + #[doc = "Get the `ignoreSearch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[wasm_bindgen(method, getter = "ignoreSearch")] + pub fn get_ignore_search(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreSearch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreSearch")] - fn ignore_search_shim(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_search(this: &CacheQueryOptions, val: bool); + #[doc = "Get the `ignoreVary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[wasm_bindgen(method, getter = "ignoreVary")] + pub fn get_ignore_vary(this: &CacheQueryOptions) -> Option; + #[doc = "Change the `ignoreVary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] #[wasm_bindgen(method, setter = "ignoreVary")] - fn ignore_vary_shim(this: &CacheQueryOptions, val: bool); + pub fn set_ignore_vary(this: &CacheQueryOptions, val: bool); } impl CacheQueryOptions { #[doc = "Construct a new `CacheQueryOptions`."] @@ -28,32 +60,24 @@ impl CacheQueryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cacheName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_cache_name()` instead."] pub fn cache_name(&mut self, val: &str) -> &mut Self { - self.cache_name_shim(val); + self.set_cache_name(val); self } - #[doc = "Change the `ignoreMethod` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_method()` instead."] pub fn ignore_method(&mut self, val: bool) -> &mut Self { - self.ignore_method_shim(val); + self.set_ignore_method(val); self } - #[doc = "Change the `ignoreSearch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_search()` instead."] pub fn ignore_search(&mut self, val: bool) -> &mut Self { - self.ignore_search_shim(val); + self.set_ignore_search(val); self } - #[doc = "Change the `ignoreVary` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + #[deprecated = "Use `set_ignore_vary()` instead."] pub fn ignore_vary(&mut self, val: bool) -> &mut Self { - self.ignore_vary_shim(val); + self.set_ignore_vary(val); self } } diff --git a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs index 1a7a53e1ea7..093dd71087f 100644 --- a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs +++ b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs @@ -10,30 +10,123 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub type CaretStateChangedEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_bubbles(this: &CaretStateChangedEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_cancelable(this: &CaretStateChangedEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_composed(this: &CaretStateChangedEventInit, val: bool); + #[cfg(feature = "DomRectReadOnly")] + #[doc = "Get the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] + #[wasm_bindgen(method, getter = "boundingClientRect")] + pub fn get_bounding_client_rect(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "DomRectReadOnly")] + #[doc = "Change the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn bounding_client_rect_shim(this: &CaretStateChangedEventInit, val: Option<&DomRectReadOnly>); + pub fn set_bounding_client_rect( + this: &CaretStateChangedEventInit, + val: Option<&DomRectReadOnly>, + ); + #[doc = "Get the `caretVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "caretVisible")] + pub fn get_caret_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `caretVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisible")] - fn caret_visible_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_caret_visible(this: &CaretStateChangedEventInit, val: bool); + #[doc = "Get the `caretVisuallyVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "caretVisuallyVisible")] + pub fn get_caret_visually_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `caretVisuallyVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "caretVisuallyVisible")] - fn caret_visually_visible_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_caret_visually_visible(this: &CaretStateChangedEventInit, val: bool); + #[doc = "Get the `collapsed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "collapsed")] + pub fn get_collapsed(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `collapsed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "collapsed")] - fn collapsed_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_collapsed(this: &CaretStateChangedEventInit, val: bool); + #[cfg(feature = "CaretChangedReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "CaretChangedReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CaretStateChangedEventInit, val: CaretChangedReason); + pub fn set_reason(this: &CaretStateChangedEventInit, val: CaretChangedReason); + #[doc = "Get the `selectedTextContent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "selectedTextContent")] + pub fn get_selected_text_content(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectedTextContent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectedTextContent")] - fn selected_text_content_shim(this: &CaretStateChangedEventInit, val: &str); + pub fn set_selected_text_content(this: &CaretStateChangedEventInit, val: &str); + #[doc = "Get the `selectionEditable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "selectionEditable")] + pub fn get_selection_editable(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectionEditable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionEditable")] - fn selection_editable_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_selection_editable(this: &CaretStateChangedEventInit, val: bool); + #[doc = "Get the `selectionVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[wasm_bindgen(method, getter = "selectionVisible")] + pub fn get_selection_visible(this: &CaretStateChangedEventInit) -> Option; + #[doc = "Change the `selectionVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] #[wasm_bindgen(method, setter = "selectionVisible")] - fn selection_visible_shim(this: &CaretStateChangedEventInit, val: bool); + pub fn set_selection_visible(this: &CaretStateChangedEventInit, val: bool); } impl CaretStateChangedEventInit { #[doc = "Construct a new `CaretStateChangedEventInit`."] @@ -44,83 +137,61 @@ impl CaretStateChangedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "DomRectReadOnly")] - #[doc = "Change the `boundingClientRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] + #[deprecated = "Use `set_bounding_client_rect()` instead."] pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self { - self.bounding_client_rect_shim(val); + self.set_bounding_client_rect(val); self } - #[doc = "Change the `caretVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_caret_visible()` instead."] pub fn caret_visible(&mut self, val: bool) -> &mut Self { - self.caret_visible_shim(val); + self.set_caret_visible(val); self } - #[doc = "Change the `caretVisuallyVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_caret_visually_visible()` instead."] pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self { - self.caret_visually_visible_shim(val); + self.set_caret_visually_visible(val); self } - #[doc = "Change the `collapsed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_collapsed()` instead."] pub fn collapsed(&mut self, val: bool) -> &mut Self { - self.collapsed_shim(val); + self.set_collapsed(val); self } #[cfg(feature = "CaretChangedReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } - #[doc = "Change the `selectedTextContent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selected_text_content()` instead."] pub fn selected_text_content(&mut self, val: &str) -> &mut Self { - self.selected_text_content_shim(val); + self.set_selected_text_content(val); self } - #[doc = "Change the `selectionEditable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selection_editable()` instead."] pub fn selection_editable(&mut self, val: bool) -> &mut Self { - self.selection_editable_shim(val); + self.set_selection_editable(val); self } - #[doc = "Change the `selectionVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + #[deprecated = "Use `set_selection_visible()` instead."] pub fn selection_visible(&mut self, val: bool) -> &mut Self { - self.selection_visible_shim(val); + self.set_selection_visible(val); self } } diff --git a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs index 2a0566f3bcc..81bdc7379f9 100644 --- a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs @@ -10,16 +10,51 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] pub type ChannelMergerOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &ChannelMergerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ChannelMergerOptions, val: u32); + pub fn set_channel_count(this: &ChannelMergerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &ChannelMergerOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ChannelMergerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ChannelMergerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &ChannelMergerOptions) + -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ChannelMergerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ChannelMergerOptions, val: ChannelInterpretation); + #[doc = "Get the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[wasm_bindgen(method, getter = "numberOfInputs")] + pub fn get_number_of_inputs(this: &ChannelMergerOptions) -> Option; + #[doc = "Change the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] #[wasm_bindgen(method, setter = "numberOfInputs")] - fn number_of_inputs_shim(this: &ChannelMergerOptions, val: u32); + pub fn set_number_of_inputs(this: &ChannelMergerOptions, val: u32); } impl ChannelMergerOptions { #[doc = "Construct a new `ChannelMergerOptions`."] @@ -30,34 +65,26 @@ impl ChannelMergerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfInputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + #[deprecated = "Use `set_number_of_inputs()` instead."] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { - self.number_of_inputs_shim(val); + self.set_number_of_inputs(val); self } } diff --git a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs index a70a522b224..582198555b0 100644 --- a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs @@ -10,16 +10,52 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] pub type ChannelSplitterOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &ChannelSplitterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ChannelSplitterOptions, val: u32); + pub fn set_channel_count(this: &ChannelSplitterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &ChannelSplitterOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ChannelSplitterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ChannelSplitterOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation( + this: &ChannelSplitterOptions, + ) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ChannelSplitterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ChannelSplitterOptions, val: ChannelInterpretation); + #[doc = "Get the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[wasm_bindgen(method, getter = "numberOfOutputs")] + pub fn get_number_of_outputs(this: &ChannelSplitterOptions) -> Option; + #[doc = "Change the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn number_of_outputs_shim(this: &ChannelSplitterOptions, val: u32); + pub fn set_number_of_outputs(this: &ChannelSplitterOptions, val: u32); } impl ChannelSplitterOptions { #[doc = "Construct a new `ChannelSplitterOptions`."] @@ -30,34 +66,26 @@ impl ChannelSplitterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `numberOfOutputs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + #[deprecated = "Use `set_number_of_outputs()` instead."] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { - self.number_of_outputs_shim(val); + self.set_number_of_outputs(val); self } } diff --git a/crates/web-sys/src/features/gen_CheckerboardReport.rs b/crates/web-sys/src/features/gen_CheckerboardReport.rs index 636544b6152..68840404323 100644 --- a/crates/web-sys/src/features/gen_CheckerboardReport.rs +++ b/crates/web-sys/src/features/gen_CheckerboardReport.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] pub type CheckerboardReport; + #[doc = "Get the `log` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[wasm_bindgen(method, getter = "log")] + pub fn get_log(this: &CheckerboardReport) -> Option; + #[doc = "Change the `log` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "log")] - fn log_shim(this: &CheckerboardReport, val: &str); + pub fn set_log(this: &CheckerboardReport, val: &str); #[cfg(feature = "CheckerboardReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &CheckerboardReport) -> Option; + #[cfg(feature = "CheckerboardReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CheckerboardReport, val: CheckerboardReason); + pub fn set_reason(this: &CheckerboardReport, val: CheckerboardReason); + #[doc = "Get the `severity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[wasm_bindgen(method, getter = "severity")] + pub fn get_severity(this: &CheckerboardReport) -> Option; + #[doc = "Change the `severity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "severity")] - fn severity_shim(this: &CheckerboardReport, val: u32); + pub fn set_severity(this: &CheckerboardReport, val: u32); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &CheckerboardReport) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &CheckerboardReport, val: f64); + pub fn set_timestamp(this: &CheckerboardReport, val: f64); } impl CheckerboardReport { #[doc = "Construct a new `CheckerboardReport`."] @@ -29,33 +62,25 @@ impl CheckerboardReport { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `log` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_log()` instead."] pub fn log(&mut self, val: &str) -> &mut Self { - self.log_shim(val); + self.set_log(val); self } #[cfg(feature = "CheckerboardReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } - #[doc = "Change the `severity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_severity()` instead."] pub fn severity(&mut self, val: u32) -> &mut Self { - self.severity_shim(val); + self.set_severity(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs index b7ec7502649..7ab4711ab1c 100644 --- a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub type ChromeFilePropertyBag; + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[wasm_bindgen(method, getter = "lastModified")] + pub fn get_last_modified(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &ChromeFilePropertyBag, val: f64); + pub fn set_last_modified(this: &ChromeFilePropertyBag, val: f64); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ChromeFilePropertyBag, val: &str); + pub fn set_type(this: &ChromeFilePropertyBag, val: &str); + #[doc = "Get the `existenceCheck` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[wasm_bindgen(method, getter = "existenceCheck")] + pub fn get_existence_check(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `existenceCheck` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "existenceCheck")] - fn existence_check_shim(this: &ChromeFilePropertyBag, val: bool); + pub fn set_existence_check(this: &ChromeFilePropertyBag, val: bool); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ChromeFilePropertyBag) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ChromeFilePropertyBag, val: &str); + pub fn set_name(this: &ChromeFilePropertyBag, val: &str); } impl ChromeFilePropertyBag { #[doc = "Construct a new `ChromeFilePropertyBag`."] @@ -28,32 +60,24 @@ impl ChromeFilePropertyBag { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: f64) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `existenceCheck` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_existence_check()` instead."] pub fn existence_check(&mut self, val: bool) -> &mut Self { - self.existence_check_shim(val); + self.set_existence_check(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_ClientQueryOptions.rs b/crates/web-sys/src/features/gen_ClientQueryOptions.rs index 79f6f0913c6..941af010e59 100644 --- a/crates/web-sys/src/features/gen_ClientQueryOptions.rs +++ b/crates/web-sys/src/features/gen_ClientQueryOptions.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] pub type ClientQueryOptions; + #[doc = "Get the `includeUncontrolled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] + #[wasm_bindgen(method, getter = "includeUncontrolled")] + pub fn get_include_uncontrolled(this: &ClientQueryOptions) -> Option; + #[doc = "Change the `includeUncontrolled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] #[wasm_bindgen(method, setter = "includeUncontrolled")] - fn include_uncontrolled_shim(this: &ClientQueryOptions, val: bool); + pub fn set_include_uncontrolled(this: &ClientQueryOptions, val: bool); #[cfg(feature = "ClientType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &ClientQueryOptions) -> Option; + #[cfg(feature = "ClientType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ClientQueryOptions, val: ClientType); + pub fn set_type(this: &ClientQueryOptions, val: ClientType); } impl ClientQueryOptions { #[doc = "Construct a new `ClientQueryOptions`."] @@ -25,19 +42,15 @@ impl ClientQueryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `includeUncontrolled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] + #[deprecated = "Use `set_include_uncontrolled()` instead."] pub fn include_uncontrolled(&mut self, val: bool) -> &mut Self { - self.include_uncontrolled_shim(val); + self.set_include_uncontrolled(val); self } #[cfg(feature = "ClientType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: ClientType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs index 151fd20d628..0aa0cf48871 100644 --- a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs +++ b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs @@ -11,10 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] pub type ClientRectsAndTexts; #[cfg(feature = "DomRectList")] + #[doc = "Get the `rectList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] + #[wasm_bindgen(method, getter = "rectList")] + pub fn get_rect_list(this: &ClientRectsAndTexts) -> DomRectList; + #[cfg(feature = "DomRectList")] + #[doc = "Change the `rectList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] #[wasm_bindgen(method, setter = "rectList")] - fn rect_list_shim(this: &ClientRectsAndTexts, val: &DomRectList); + pub fn set_rect_list(this: &ClientRectsAndTexts, val: &DomRectList); + #[doc = "Get the `textList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] + #[wasm_bindgen(method, getter = "textList")] + pub fn get_text_list(this: &ClientRectsAndTexts) -> ::js_sys::Array; + #[doc = "Change the `textList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] #[wasm_bindgen(method, setter = "textList")] - fn text_list_shim(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); + pub fn set_text_list(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); } impl ClientRectsAndTexts { #[cfg(feature = "DomRectList")] @@ -29,18 +46,14 @@ impl ClientRectsAndTexts { ret } #[cfg(feature = "DomRectList")] - #[doc = "Change the `rectList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] + #[deprecated = "Use `set_rect_list()` instead."] pub fn rect_list(&mut self, val: &DomRectList) -> &mut Self { - self.rect_list_shim(val); + self.set_rect_list(val); self } - #[doc = "Change the `textList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] + #[deprecated = "Use `set_text_list()` instead."] pub fn text_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.text_list_shim(val); + self.set_text_list(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardEventInit.rs b/crates/web-sys/src/features/gen_ClipboardEventInit.rs index 57fae5e2914..c0f0c649583 100644 --- a/crates/web-sys/src/features/gen_ClipboardEventInit.rs +++ b/crates/web-sys/src/features/gen_ClipboardEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] pub type ClipboardEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ClipboardEventInit, val: bool); + pub fn set_bubbles(this: &ClipboardEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ClipboardEventInit, val: bool); + pub fn set_cancelable(this: &ClipboardEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ClipboardEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ClipboardEventInit, val: bool); + pub fn set_composed(this: &ClipboardEventInit, val: bool); #[cfg(feature = "DataTransfer")] + #[doc = "Get the `clipboardData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] + #[wasm_bindgen(method, getter = "clipboardData")] + pub fn get_clipboard_data(this: &ClipboardEventInit) -> Option; + #[cfg(feature = "DataTransfer")] + #[doc = "Change the `clipboardData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] #[wasm_bindgen(method, setter = "clipboardData")] - fn clipboard_data_shim(this: &ClipboardEventInit, val: Option<&DataTransfer>); + pub fn set_clipboard_data(this: &ClipboardEventInit, val: Option<&DataTransfer>); } impl ClipboardEventInit { #[doc = "Construct a new `ClipboardEventInit`."] @@ -29,33 +62,25 @@ impl ClipboardEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `clipboardData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] + #[deprecated = "Use `set_clipboard_data()` instead."] pub fn clipboard_data(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.clipboard_data_shim(val); + self.set_clipboard_data(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs index 0f8b5121183..13c368ab976 100644 --- a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs +++ b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`*"] pub type ClipboardItemOptions; #[cfg(feature = "PresentationStyle")] + #[doc = "Get the `presentationStyle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] + #[wasm_bindgen(method, getter = "presentationStyle")] + pub fn get_presentation_style(this: &ClipboardItemOptions) -> Option; + #[cfg(feature = "PresentationStyle")] + #[doc = "Change the `presentationStyle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] #[wasm_bindgen(method, setter = "presentationStyle")] - fn presentation_style_shim(this: &ClipboardItemOptions, val: PresentationStyle); + pub fn set_presentation_style(this: &ClipboardItemOptions, val: PresentationStyle); } impl ClipboardItemOptions { #[doc = "Construct a new `ClipboardItemOptions`."] @@ -24,11 +33,9 @@ impl ClipboardItemOptions { ret } #[cfg(feature = "PresentationStyle")] - #[doc = "Change the `presentationStyle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] + #[deprecated = "Use `set_presentation_style()` instead."] pub fn presentation_style(&mut self, val: PresentationStyle) -> &mut Self { - self.presentation_style_shim(val); + self.set_presentation_style(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs index 5c8ac6e004d..541b0a317e6 100644 --- a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ClipboardPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ClipboardPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ClipboardPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &ClipboardPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowWithoutGesture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "allowWithoutGesture")] + pub fn get_allow_without_gesture(this: &ClipboardPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowWithoutGesture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowWithoutGesture")] - fn allow_without_gesture_shim(this: &ClipboardPermissionDescriptor, val: bool); + pub fn set_allow_without_gesture(this: &ClipboardPermissionDescriptor, val: bool); } #[cfg(web_sys_unstable_apis)] impl ClipboardPermissionDescriptor { @@ -37,25 +70,15 @@ impl ClipboardPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowWithoutGesture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allow_without_gesture()` instead."] pub fn allow_without_gesture(&mut self, val: bool) -> &mut Self { - self.allow_without_gesture_shim(val); + self.set_allow_without_gesture(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardUnsanitizedFormats.rs b/crates/web-sys/src/features/gen_ClipboardUnsanitizedFormats.rs index a4e5fa3251e..f1606f53923 100644 --- a/crates/web-sys/src/features/gen_ClipboardUnsanitizedFormats.rs +++ b/crates/web-sys/src/features/gen_ClipboardUnsanitizedFormats.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ClipboardUnsanitizedFormats; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unsanitized` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardUnsanitizedFormats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unsanitized")] + pub fn get_unsanitized(this: &ClipboardUnsanitizedFormats) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `unsanitized` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardUnsanitizedFormats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "unsanitized")] - fn unsanitized_shim(this: &ClipboardUnsanitizedFormats, val: &::wasm_bindgen::JsValue); + pub fn set_unsanitized(this: &ClipboardUnsanitizedFormats, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl ClipboardUnsanitizedFormats { @@ -31,14 +47,9 @@ impl ClipboardUnsanitizedFormats { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `unsanitized` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ClipboardUnsanitizedFormats`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_unsanitized()` instead."] pub fn unsanitized(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.unsanitized_shim(val); + self.set_unsanitized(val); self } } diff --git a/crates/web-sys/src/features/gen_CloseEventInit.rs b/crates/web-sys/src/features/gen_CloseEventInit.rs index 16b73d6cd89..841376c6536 100644 --- a/crates/web-sys/src/features/gen_CloseEventInit.rs +++ b/crates/web-sys/src/features/gen_CloseEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub type CloseEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &CloseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CloseEventInit, val: bool); + pub fn set_bubbles(this: &CloseEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &CloseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CloseEventInit, val: bool); + pub fn set_cancelable(this: &CloseEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &CloseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CloseEventInit, val: bool); + pub fn set_composed(this: &CloseEventInit, val: bool); + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "code")] + pub fn get_code(this: &CloseEventInit) -> Option; + #[doc = "Change the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &CloseEventInit, val: u16); + pub fn set_code(this: &CloseEventInit, val: u16); + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &CloseEventInit) -> Option; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CloseEventInit, val: &str); + pub fn set_reason(this: &CloseEventInit, val: &str); + #[doc = "Get the `wasClean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[wasm_bindgen(method, getter = "wasClean")] + pub fn get_was_clean(this: &CloseEventInit) -> Option; + #[doc = "Change the `wasClean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] #[wasm_bindgen(method, setter = "wasClean")] - fn was_clean_shim(this: &CloseEventInit, val: bool); + pub fn set_was_clean(this: &CloseEventInit, val: bool); } impl CloseEventInit { #[doc = "Construct a new `CloseEventInit`."] @@ -32,46 +80,34 @@ impl CloseEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `code` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_code()` instead."] pub fn code(&mut self, val: u16) -> &mut Self { - self.code_shim(val); + self.set_code(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } - #[doc = "Change the `wasClean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + #[deprecated = "Use `set_was_clean()` instead."] pub fn was_clean(&mut self, val: bool) -> &mut Self { - self.was_clean_shim(val); + self.set_was_clean(val); self } } diff --git a/crates/web-sys/src/features/gen_CollectedClientData.rs b/crates/web-sys/src/features/gen_CollectedClientData.rs index 96b9b4a5d0e..e483aed9ae7 100644 --- a/crates/web-sys/src/features/gen_CollectedClientData.rs +++ b/crates/web-sys/src/features/gen_CollectedClientData.rs @@ -10,22 +10,73 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub type CollectedClientData; + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "challenge")] + pub fn get_challenge(this: &CollectedClientData) -> String; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &CollectedClientData, val: &str); + pub fn set_challenge(this: &CollectedClientData, val: &str); #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `clientExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "clientExtensions")] + pub fn get_client_extensions( + this: &CollectedClientData, + ) -> Option; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `clientExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] #[wasm_bindgen(method, setter = "clientExtensions")] - fn client_extensions_shim( + pub fn set_client_extensions( this: &CollectedClientData, val: &AuthenticationExtensionsClientInputs, ); + #[doc = "Get the `hashAlgorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "hashAlgorithm")] + pub fn get_hash_algorithm(this: &CollectedClientData) -> String; + #[doc = "Change the `hashAlgorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "hashAlgorithm")] - fn hash_algorithm_shim(this: &CollectedClientData, val: &str); + pub fn set_hash_algorithm(this: &CollectedClientData, val: &str); + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &CollectedClientData) -> String; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &CollectedClientData, val: &str); + pub fn set_origin(this: &CollectedClientData, val: &str); + #[doc = "Get the `tokenBindingId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "tokenBindingId")] + pub fn get_token_binding_id(this: &CollectedClientData) -> Option; + #[doc = "Change the `tokenBindingId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "tokenBindingId")] - fn token_binding_id_shim(this: &CollectedClientData, val: &str); + pub fn set_token_binding_id(this: &CollectedClientData, val: &str); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &CollectedClientData) -> String; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &CollectedClientData, val: &str); + pub fn set_type(this: &CollectedClientData, val: &str); } impl CollectedClientData { #[doc = "Construct a new `CollectedClientData`."] @@ -40,47 +91,35 @@ impl CollectedClientData { ret.type_(type_); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `clientExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] + #[deprecated = "Use `set_client_extensions()` instead."] pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.client_extensions_shim(val); + self.set_client_extensions(val); self } - #[doc = "Change the `hashAlgorithm` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_hash_algorithm()` instead."] pub fn hash_algorithm(&mut self, val: &str) -> &mut Self { - self.hash_algorithm_shim(val); + self.set_hash_algorithm(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `tokenBindingId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_token_binding_id()` instead."] pub fn token_binding_id(&mut self, val: &str) -> &mut Self { - self.token_binding_id_shim(val); + self.set_token_binding_id(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_CompositionEventInit.rs b/crates/web-sys/src/features/gen_CompositionEventInit.rs index 8f2ec5a6b48..79acc2f4d53 100644 --- a/crates/web-sys/src/features/gen_CompositionEventInit.rs +++ b/crates/web-sys/src/features/gen_CompositionEventInit.rs @@ -10,19 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub type CompositionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &CompositionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CompositionEventInit, val: bool); + pub fn set_bubbles(this: &CompositionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &CompositionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CompositionEventInit, val: bool); + pub fn set_cancelable(this: &CompositionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &CompositionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CompositionEventInit, val: bool); + pub fn set_composed(this: &CompositionEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &CompositionEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &CompositionEventInit, val: i32); + pub fn set_detail(this: &CompositionEventInit, val: i32); + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &CompositionEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &CompositionEventInit, val: Option<&Window>); + pub fn set_view(this: &CompositionEventInit, val: Option<&Window>); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &CompositionEventInit) -> Option; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &CompositionEventInit, val: &str); + pub fn set_data(this: &CompositionEventInit, val: &str); } impl CompositionEventInit { #[doc = "Construct a new `CompositionEventInit`."] @@ -33,47 +82,35 @@ impl CompositionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &str) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } } diff --git a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs index 8d55c2533ea..a079e830f73 100644 --- a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs +++ b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs @@ -10,34 +10,140 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub type ComputedEffectTiming; + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_delay(this: &ComputedEffectTiming, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &ComputedEffectTiming) -> Option; #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &ComputedEffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &ComputedEffectTiming, val: PlaybackDirection); + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &ComputedEffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &ComputedEffectTiming, val: &str); + pub fn set_easing(this: &ComputedEffectTiming, val: &str); + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "endDelay")] + pub fn get_end_delay(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_end_delay(this: &ComputedEffectTiming, val: f64); #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &ComputedEffectTiming) -> Option; + #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &ComputedEffectTiming, val: FillMode); + pub fn set_fill(this: &ComputedEffectTiming, val: FillMode); + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "iterationStart")] + pub fn get_iteration_start(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_iteration_start(this: &ComputedEffectTiming, val: f64); + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_iterations(this: &ComputedEffectTiming, val: f64); + #[doc = "Get the `activeDuration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "activeDuration")] + pub fn get_active_duration(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `activeDuration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "activeDuration")] - fn active_duration_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_active_duration(this: &ComputedEffectTiming, val: f64); + #[doc = "Get the `currentIteration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "currentIteration")] + pub fn get_current_iteration(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `currentIteration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "currentIteration")] - fn current_iteration_shim(this: &ComputedEffectTiming, val: Option); + pub fn set_current_iteration(this: &ComputedEffectTiming, val: Option); + #[doc = "Get the `endTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "endTime")] + pub fn get_end_time(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `endTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "endTime")] - fn end_time_shim(this: &ComputedEffectTiming, val: f64); + pub fn set_end_time(this: &ComputedEffectTiming, val: f64); + #[doc = "Get the `localTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "localTime")] + pub fn get_local_time(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `localTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "localTime")] - fn local_time_shim(this: &ComputedEffectTiming, val: Option); + pub fn set_local_time(this: &ComputedEffectTiming, val: Option); + #[doc = "Get the `progress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[wasm_bindgen(method, getter = "progress")] + pub fn get_progress(this: &ComputedEffectTiming) -> Option; + #[doc = "Change the `progress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] #[wasm_bindgen(method, setter = "progress")] - fn progress_shim(this: &ComputedEffectTiming, val: Option); + pub fn set_progress(this: &ComputedEffectTiming, val: Option); } impl ComputedEffectTiming { #[doc = "Construct a new `ComputedEffectTiming`."] @@ -48,97 +154,71 @@ impl ComputedEffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations(val); self } - #[doc = "Change the `activeDuration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_active_duration()` instead."] pub fn active_duration(&mut self, val: f64) -> &mut Self { - self.active_duration_shim(val); + self.set_active_duration(val); self } - #[doc = "Change the `currentIteration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_current_iteration()` instead."] pub fn current_iteration(&mut self, val: Option) -> &mut Self { - self.current_iteration_shim(val); + self.set_current_iteration(val); self } - #[doc = "Change the `endTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_end_time()` instead."] pub fn end_time(&mut self, val: f64) -> &mut Self { - self.end_time_shim(val); + self.set_end_time(val); self } - #[doc = "Change the `localTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_local_time()` instead."] pub fn local_time(&mut self, val: Option) -> &mut Self { - self.local_time_shim(val); + self.set_local_time(val); self } - #[doc = "Change the `progress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + #[deprecated = "Use `set_progress()` instead."] pub fn progress(&mut self, val: Option) -> &mut Self { - self.progress_shim(val); + self.set_progress(val); self } } diff --git a/crates/web-sys/src/features/gen_ConnStatusDict.rs b/crates/web-sys/src/features/gen_ConnStatusDict.rs index be5540fc998..e30dac419c1 100644 --- a/crates/web-sys/src/features/gen_ConnStatusDict.rs +++ b/crates/web-sys/src/features/gen_ConnStatusDict.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] pub type ConnStatusDict; + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] + #[wasm_bindgen(method, getter = "status")] + pub fn get_status(this: &ConnStatusDict) -> Option; + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &ConnStatusDict, val: &str); + pub fn set_status(this: &ConnStatusDict, val: &str); } impl ConnStatusDict { #[doc = "Construct a new `ConnStatusDict`."] @@ -22,11 +30,9 @@ impl ConnStatusDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: &str) -> &mut Self { - self.status_shim(val); + self.set_status(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleCounter.rs b/crates/web-sys/src/features/gen_ConsoleCounter.rs index be0416a4baf..324e055fd0f 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounter.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounter.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] pub type ConsoleCounter; + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[wasm_bindgen(method, getter = "count")] + pub fn get_count(this: &ConsoleCounter) -> Option; + #[doc = "Change the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &ConsoleCounter, val: u32); + pub fn set_count(this: &ConsoleCounter, val: u32); + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &ConsoleCounter) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &ConsoleCounter, val: &str); + pub fn set_label(this: &ConsoleCounter, val: &str); } impl ConsoleCounter { #[doc = "Construct a new `ConsoleCounter`."] @@ -24,18 +40,14 @@ impl ConsoleCounter { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `count` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[deprecated = "Use `set_count()` instead."] pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); + self.set_count(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleCounterError.rs b/crates/web-sys/src/features/gen_ConsoleCounterError.rs index 69738146c54..bbc0a56a2f8 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounterError.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounterError.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] pub type ConsoleCounterError; + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &ConsoleCounterError) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ConsoleCounterError, val: &str); + pub fn set_error(this: &ConsoleCounterError, val: &str); + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &ConsoleCounterError) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &ConsoleCounterError, val: &str); + pub fn set_label(this: &ConsoleCounterError, val: &str); } impl ConsoleCounterError { #[doc = "Construct a new `ConsoleCounterError`."] @@ -24,18 +40,14 @@ impl ConsoleCounterError { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleEvent.rs b/crates/web-sys/src/features/gen_ConsoleEvent.rs index d88d063f088..1ab9de14dd2 100644 --- a/crates/web-sys/src/features/gen_ConsoleEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleEvent.rs @@ -10,40 +10,176 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub type ConsoleEvent; + #[doc = "Get the `ID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "ID")] + pub fn get_id(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `ID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "ID")] - fn id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `addonId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "addonId")] + pub fn get_addon_id(this: &ConsoleEvent) -> Option; + #[doc = "Change the `addonId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "addonId")] - fn addon_id_shim(this: &ConsoleEvent, val: &str); + pub fn set_addon_id(this: &ConsoleEvent, val: &str); + #[doc = "Get the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "arguments")] + pub fn get_arguments(this: &ConsoleEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "arguments")] - fn arguments_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_arguments(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "columnNumber")] + pub fn get_column_number(this: &ConsoleEvent) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &ConsoleEvent, val: u32); + pub fn set_column_number(this: &ConsoleEvent, val: u32); + #[doc = "Get the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "consoleID")] + pub fn get_console_id(this: &ConsoleEvent) -> Option; + #[doc = "Change the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "consoleID")] - fn console_id_shim(this: &ConsoleEvent, val: &str); + pub fn set_console_id(this: &ConsoleEvent, val: &str); + #[doc = "Get the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "counter")] + pub fn get_counter(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "counter")] - fn counter_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_counter(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "filename")] + pub fn get_filename(this: &ConsoleEvent) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ConsoleEvent, val: &str); + pub fn set_filename(this: &ConsoleEvent, val: &str); + #[doc = "Get the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "functionName")] + pub fn get_function_name(this: &ConsoleEvent) -> Option; + #[doc = "Change the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "functionName")] - fn function_name_shim(this: &ConsoleEvent, val: &str); + pub fn set_function_name(this: &ConsoleEvent, val: &str); + #[doc = "Get the `groupName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "groupName")] + pub fn get_group_name(this: &ConsoleEvent) -> Option; + #[doc = "Change the `groupName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "groupName")] - fn group_name_shim(this: &ConsoleEvent, val: &str); + pub fn set_group_name(this: &ConsoleEvent, val: &str); + #[doc = "Get the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "innerID")] + pub fn get_inner_id(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "innerID")] - fn inner_id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_inner_id(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `level` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "level")] + pub fn get_level(this: &ConsoleEvent) -> Option; + #[doc = "Change the `level` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "level")] - fn level_shim(this: &ConsoleEvent, val: &str); + pub fn set_level(this: &ConsoleEvent, val: &str); + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "lineNumber")] + pub fn get_line_number(this: &ConsoleEvent) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &ConsoleEvent, val: u32); + pub fn set_line_number(this: &ConsoleEvent, val: u32); + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "prefix")] + pub fn get_prefix(this: &ConsoleEvent) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &ConsoleEvent, val: &str); + pub fn set_prefix(this: &ConsoleEvent, val: &str); + #[doc = "Get the `private` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "private")] + pub fn get_private(this: &ConsoleEvent) -> Option; + #[doc = "Change the `private` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "private")] - fn private_shim(this: &ConsoleEvent, val: bool); + pub fn set_private(this: &ConsoleEvent, val: bool); + #[doc = "Get the `styles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "styles")] + pub fn get_styles(this: &ConsoleEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `styles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "styles")] - fn styles_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_styles(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `timeStamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "timeStamp")] + pub fn get_time_stamp(this: &ConsoleEvent) -> Option; + #[doc = "Change the `timeStamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "timeStamp")] - fn time_stamp_shim(this: &ConsoleEvent, val: f64); + pub fn set_time_stamp(this: &ConsoleEvent, val: f64); + #[doc = "Get the `timer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[wasm_bindgen(method, getter = "timer")] + pub fn get_timer(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `timer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] #[wasm_bindgen(method, setter = "timer")] - fn timer_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + pub fn set_timer(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); } impl ConsoleEvent { #[doc = "Construct a new `ConsoleEvent`."] @@ -54,123 +190,89 @@ impl ConsoleEvent { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `addonId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_addon_id()` instead."] pub fn addon_id(&mut self, val: &str) -> &mut Self { - self.addon_id_shim(val); + self.set_addon_id(val); self } - #[doc = "Change the `arguments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_arguments()` instead."] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.arguments_shim(val); + self.set_arguments(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: u32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number(val); self } - #[doc = "Change the `consoleID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_console_id()` instead."] pub fn console_id(&mut self, val: &str) -> &mut Self { - self.console_id_shim(val); + self.set_console_id(val); self } - #[doc = "Change the `counter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_counter()` instead."] pub fn counter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.counter_shim(val); + self.set_counter(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename(val); self } - #[doc = "Change the `functionName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_function_name()` instead."] pub fn function_name(&mut self, val: &str) -> &mut Self { - self.function_name_shim(val); + self.set_function_name(val); self } - #[doc = "Change the `groupName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_group_name()` instead."] pub fn group_name(&mut self, val: &str) -> &mut Self { - self.group_name_shim(val); + self.set_group_name(val); self } - #[doc = "Change the `innerID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_inner_id()` instead."] pub fn inner_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.inner_id_shim(val); + self.set_inner_id(val); self } - #[doc = "Change the `level` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_level()` instead."] pub fn level(&mut self, val: &str) -> &mut Self { - self.level_shim(val); + self.set_level(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: u32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix(val); self } - #[doc = "Change the `private` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_private()` instead."] pub fn private(&mut self, val: bool) -> &mut Self { - self.private_shim(val); + self.set_private(val); self } - #[doc = "Change the `styles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_styles()` instead."] pub fn styles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.styles_shim(val); + self.set_styles(val); self } - #[doc = "Change the `timeStamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_time_stamp()` instead."] pub fn time_stamp(&mut self, val: f64) -> &mut Self { - self.time_stamp_shim(val); + self.set_time_stamp(val); self } - #[doc = "Change the `timer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + #[deprecated = "Use `set_timer()` instead."] pub fn timer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.timer_shim(val); + self.set_timer(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs index 2b807509ef7..49f01a0f33e 100644 --- a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs +++ b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs @@ -10,19 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub type ConsoleInstanceOptions; + #[doc = "Get the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[wasm_bindgen(method, getter = "consoleID")] + pub fn get_console_id(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "consoleID")] - fn console_id_shim(this: &ConsoleInstanceOptions, val: &str); + pub fn set_console_id(this: &ConsoleInstanceOptions, val: &str); + #[doc = "Get the `dump` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[wasm_bindgen(method, getter = "dump")] + pub fn get_dump(this: &ConsoleInstanceOptions) -> Option<::js_sys::Function>; + #[doc = "Change the `dump` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "dump")] - fn dump_shim(this: &ConsoleInstanceOptions, val: &::js_sys::Function); + pub fn set_dump(this: &ConsoleInstanceOptions, val: &::js_sys::Function); + #[doc = "Get the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[wasm_bindgen(method, getter = "innerID")] + pub fn get_inner_id(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "innerID")] - fn inner_id_shim(this: &ConsoleInstanceOptions, val: &str); + pub fn set_inner_id(this: &ConsoleInstanceOptions, val: &str); + #[cfg(feature = "ConsoleLogLevel")] + #[doc = "Get the `maxLogLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] + #[wasm_bindgen(method, getter = "maxLogLevel")] + pub fn get_max_log_level(this: &ConsoleInstanceOptions) -> Option; #[cfg(feature = "ConsoleLogLevel")] + #[doc = "Change the `maxLogLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] #[wasm_bindgen(method, setter = "maxLogLevel")] - fn max_log_level_shim(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); + pub fn set_max_log_level(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); + #[doc = "Get the `maxLogLevelPref` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[wasm_bindgen(method, getter = "maxLogLevelPref")] + pub fn get_max_log_level_pref(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `maxLogLevelPref` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "maxLogLevelPref")] - fn max_log_level_pref_shim(this: &ConsoleInstanceOptions, val: &str); + pub fn set_max_log_level_pref(this: &ConsoleInstanceOptions, val: &str); + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[wasm_bindgen(method, getter = "prefix")] + pub fn get_prefix(this: &ConsoleInstanceOptions) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &ConsoleInstanceOptions, val: &str); + pub fn set_prefix(this: &ConsoleInstanceOptions, val: &str); } impl ConsoleInstanceOptions { #[doc = "Construct a new `ConsoleInstanceOptions`."] @@ -33,47 +82,35 @@ impl ConsoleInstanceOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `consoleID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_console_id()` instead."] pub fn console_id(&mut self, val: &str) -> &mut Self { - self.console_id_shim(val); + self.set_console_id(val); self } - #[doc = "Change the `dump` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_dump()` instead."] pub fn dump(&mut self, val: &::js_sys::Function) -> &mut Self { - self.dump_shim(val); + self.set_dump(val); self } - #[doc = "Change the `innerID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_inner_id()` instead."] pub fn inner_id(&mut self, val: &str) -> &mut Self { - self.inner_id_shim(val); + self.set_inner_id(val); self } #[cfg(feature = "ConsoleLogLevel")] - #[doc = "Change the `maxLogLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] + #[deprecated = "Use `set_max_log_level()` instead."] pub fn max_log_level(&mut self, val: ConsoleLogLevel) -> &mut Self { - self.max_log_level_shim(val); + self.set_max_log_level(val); self } - #[doc = "Change the `maxLogLevelPref` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_max_log_level_pref()` instead."] pub fn max_log_level_pref(&mut self, val: &str) -> &mut Self { - self.max_log_level_pref_shim(val); + self.set_max_log_level_pref(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs index 833b5be4d40..a845e746dc1 100644 --- a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] pub type ConsoleProfileEvent; + #[doc = "Get the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[wasm_bindgen(method, getter = "action")] + pub fn get_action(this: &ConsoleProfileEvent) -> Option; + #[doc = "Change the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &ConsoleProfileEvent, val: &str); + pub fn set_action(this: &ConsoleProfileEvent, val: &str); + #[doc = "Get the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[wasm_bindgen(method, getter = "arguments")] + pub fn get_arguments(this: &ConsoleProfileEvent) -> Option<::js_sys::Array>; + #[doc = "Change the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] #[wasm_bindgen(method, setter = "arguments")] - fn arguments_shim(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); + pub fn set_arguments(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); } impl ConsoleProfileEvent { #[doc = "Construct a new `ConsoleProfileEvent`."] @@ -24,18 +40,14 @@ impl ConsoleProfileEvent { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `action` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[deprecated = "Use `set_action()` instead."] pub fn action(&mut self, val: &str) -> &mut Self { - self.action_shim(val); + self.set_action(val); self } - #[doc = "Change the `arguments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + #[deprecated = "Use `set_arguments()` instead."] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.arguments_shim(val); + self.set_arguments(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs index 12555018b78..b1ffa84f6de 100644 --- a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs +++ b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub type ConsoleStackEntry; + #[doc = "Get the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[wasm_bindgen(method, getter = "asyncCause")] + pub fn get_async_cause(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "asyncCause")] - fn async_cause_shim(this: &ConsoleStackEntry, val: Option<&str>); + pub fn set_async_cause(this: &ConsoleStackEntry, val: Option<&str>); + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[wasm_bindgen(method, getter = "columnNumber")] + pub fn get_column_number(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &ConsoleStackEntry, val: u32); + pub fn set_column_number(this: &ConsoleStackEntry, val: u32); + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[wasm_bindgen(method, getter = "filename")] + pub fn get_filename(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ConsoleStackEntry, val: &str); + pub fn set_filename(this: &ConsoleStackEntry, val: &str); + #[doc = "Get the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[wasm_bindgen(method, getter = "functionName")] + pub fn get_function_name(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "functionName")] - fn function_name_shim(this: &ConsoleStackEntry, val: &str); + pub fn set_function_name(this: &ConsoleStackEntry, val: &str); + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[wasm_bindgen(method, getter = "lineNumber")] + pub fn get_line_number(this: &ConsoleStackEntry) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &ConsoleStackEntry, val: u32); + pub fn set_line_number(this: &ConsoleStackEntry, val: u32); } impl ConsoleStackEntry { #[doc = "Construct a new `ConsoleStackEntry`."] @@ -30,39 +70,29 @@ impl ConsoleStackEntry { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `asyncCause` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_async_cause()` instead."] pub fn async_cause(&mut self, val: Option<&str>) -> &mut Self { - self.async_cause_shim(val); + self.set_async_cause(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: u32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename(val); self } - #[doc = "Change the `functionName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_function_name()` instead."] pub fn function_name(&mut self, val: &str) -> &mut Self { - self.function_name_shim(val); + self.set_function_name(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: u32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerError.rs b/crates/web-sys/src/features/gen_ConsoleTimerError.rs index 9455aff12d3..b23bcbf3963 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerError.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerError.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] pub type ConsoleTimerError; + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &ConsoleTimerError) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ConsoleTimerError, val: &str); + pub fn set_error(this: &ConsoleTimerError, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ConsoleTimerError) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerError, val: &str); + pub fn set_name(this: &ConsoleTimerError, val: &str); } impl ConsoleTimerError { #[doc = "Construct a new `ConsoleTimerError`."] @@ -24,18 +40,14 @@ impl ConsoleTimerError { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs index 0d3b294a926..7e74b760b0a 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] pub type ConsoleTimerLogOrEnd; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &ConsoleTimerLogOrEnd) -> Option; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &ConsoleTimerLogOrEnd, val: f64); + pub fn set_duration(this: &ConsoleTimerLogOrEnd, val: f64); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ConsoleTimerLogOrEnd) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerLogOrEnd, val: &str); + pub fn set_name(this: &ConsoleTimerLogOrEnd, val: &str); } impl ConsoleTimerLogOrEnd { #[doc = "Construct a new `ConsoleTimerLogOrEnd`."] @@ -24,18 +40,14 @@ impl ConsoleTimerLogOrEnd { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs index d4e2a17d04c..5d3bd715226 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] pub type ConsoleTimerStart; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ConsoleTimerStart) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerStart, val: &str); + pub fn set_name(this: &ConsoleTimerStart, val: &str); } impl ConsoleTimerStart { #[doc = "Construct a new `ConsoleTimerStart`."] @@ -22,11 +30,9 @@ impl ConsoleTimerStart { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs index 206ed0a76af..7b96a490b75 100644 --- a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs +++ b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] pub type ConstantSourceOptions; + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &ConstantSourceOptions) -> Option; + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &ConstantSourceOptions, val: f32); + pub fn set_offset(this: &ConstantSourceOptions, val: f32); } impl ConstantSourceOptions { #[doc = "Construct a new `ConstantSourceOptions`."] @@ -22,11 +30,9 @@ impl ConstantSourceOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f32) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs index 6885925daa3..51b890c87e3 100644 --- a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] pub type ConstrainBooleanParameters; + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[wasm_bindgen(method, getter = "exact")] + pub fn get_exact(this: &ConstrainBooleanParameters) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainBooleanParameters, val: bool); + pub fn set_exact(this: &ConstrainBooleanParameters, val: bool); + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[wasm_bindgen(method, getter = "ideal")] + pub fn get_ideal(this: &ConstrainBooleanParameters) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainBooleanParameters, val: bool); + pub fn set_ideal(this: &ConstrainBooleanParameters, val: bool); } impl ConstrainBooleanParameters { #[doc = "Construct a new `ConstrainBooleanParameters`."] @@ -24,18 +40,14 @@ impl ConstrainBooleanParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: bool) -> &mut Self { - self.exact_shim(val); + self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: bool) -> &mut Self { - self.ideal_shim(val); + self.set_ideal(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs index 71f3bf16b92..b2827f2f132 100644 --- a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] pub type ConstrainDomStringParameters; + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[wasm_bindgen(method, getter = "exact")] + pub fn get_exact(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + pub fn set_exact(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[wasm_bindgen(method, getter = "ideal")] + pub fn get_ideal(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + pub fn set_ideal(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); } impl ConstrainDomStringParameters { #[doc = "Construct a new `ConstrainDomStringParameters`."] @@ -24,18 +40,14 @@ impl ConstrainDomStringParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.exact_shim(val); + self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ideal_shim(val); + self.set_ideal(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs index ac4e0ccb31f..2a543032019 100644 --- a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub type ConstrainDoubleRange; + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[wasm_bindgen(method, getter = "exact")] + pub fn get_exact(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainDoubleRange, val: f64); + pub fn set_exact(this: &ConstrainDoubleRange, val: f64); + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[wasm_bindgen(method, getter = "ideal")] + pub fn get_ideal(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainDoubleRange, val: f64); + pub fn set_ideal(this: &ConstrainDoubleRange, val: f64); + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[wasm_bindgen(method, getter = "max")] + pub fn get_max(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &ConstrainDoubleRange, val: f64); + pub fn set_max(this: &ConstrainDoubleRange, val: f64); + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[wasm_bindgen(method, getter = "min")] + pub fn get_min(this: &ConstrainDoubleRange) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &ConstrainDoubleRange, val: f64); + pub fn set_min(this: &ConstrainDoubleRange, val: f64); } impl ConstrainDoubleRange { #[doc = "Construct a new `ConstrainDoubleRange`."] @@ -28,32 +60,24 @@ impl ConstrainDoubleRange { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: f64) -> &mut Self { - self.exact_shim(val); + self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: f64) -> &mut Self { - self.ideal_shim(val); + self.set_ideal(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { - self.max_shim(val); + self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { - self.min_shim(val); + self.set_min(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainLongRange.rs b/crates/web-sys/src/features/gen_ConstrainLongRange.rs index 58deaf0f387..9a284100e08 100644 --- a/crates/web-sys/src/features/gen_ConstrainLongRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainLongRange.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub type ConstrainLongRange; + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[wasm_bindgen(method, getter = "exact")] + pub fn get_exact(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainLongRange, val: i32); + pub fn set_exact(this: &ConstrainLongRange, val: i32); + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[wasm_bindgen(method, getter = "ideal")] + pub fn get_ideal(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainLongRange, val: i32); + pub fn set_ideal(this: &ConstrainLongRange, val: i32); + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[wasm_bindgen(method, getter = "max")] + pub fn get_max(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &ConstrainLongRange, val: i32); + pub fn set_max(this: &ConstrainLongRange, val: i32); + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[wasm_bindgen(method, getter = "min")] + pub fn get_min(this: &ConstrainLongRange) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &ConstrainLongRange, val: i32); + pub fn set_min(this: &ConstrainLongRange, val: i32); } impl ConstrainLongRange { #[doc = "Construct a new `ConstrainLongRange`."] @@ -28,32 +60,24 @@ impl ConstrainLongRange { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `exact` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_exact()` instead."] pub fn exact(&mut self, val: i32) -> &mut Self { - self.exact_shim(val); + self.set_exact(val); self } - #[doc = "Change the `ideal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_ideal()` instead."] pub fn ideal(&mut self, val: i32) -> &mut Self { - self.ideal_shim(val); + self.set_ideal(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: i32) -> &mut Self { - self.max_shim(val); + self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: i32) -> &mut Self { - self.min_shim(val); + self.set_min(val); self } } diff --git a/crates/web-sys/src/features/gen_ContextAttributes2d.rs b/crates/web-sys/src/features/gen_ContextAttributes2d.rs index 6e46206dd2a..570c3aca543 100644 --- a/crates/web-sys/src/features/gen_ContextAttributes2d.rs +++ b/crates/web-sys/src/features/gen_ContextAttributes2d.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] pub type ContextAttributes2d; + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &ContextAttributes2d) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &ContextAttributes2d, val: bool); + pub fn set_alpha(this: &ContextAttributes2d, val: bool); + #[doc = "Get the `willReadFrequently` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[wasm_bindgen(method, getter = "willReadFrequently")] + pub fn get_will_read_frequently(this: &ContextAttributes2d) -> Option; + #[doc = "Change the `willReadFrequently` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] #[wasm_bindgen(method, setter = "willReadFrequently")] - fn will_read_frequently_shim(this: &ContextAttributes2d, val: bool); + pub fn set_will_read_frequently(this: &ContextAttributes2d, val: bool); } impl ContextAttributes2d { #[doc = "Construct a new `ContextAttributes2d`."] @@ -24,18 +40,14 @@ impl ContextAttributes2d { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); + self.set_alpha(val); self } - #[doc = "Change the `willReadFrequently` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + #[deprecated = "Use `set_will_read_frequently()` instead."] pub fn will_read_frequently(&mut self, val: bool) -> &mut Self { - self.will_read_frequently_shim(val); + self.set_will_read_frequently(val); self } } diff --git a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs index 0e1493f0a85..9d31410e431 100644 --- a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs +++ b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs @@ -11,11 +11,29 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`*"] pub type ConvertCoordinateOptions; #[cfg(feature = "CssBoxType")] + #[doc = "Get the `fromBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[wasm_bindgen(method, getter = "fromBox")] + pub fn get_from_box(this: &ConvertCoordinateOptions) -> Option; + #[cfg(feature = "CssBoxType")] + #[doc = "Change the `fromBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "fromBox")] - fn from_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); + pub fn set_from_box(this: &ConvertCoordinateOptions, val: CssBoxType); + #[cfg(feature = "CssBoxType")] + #[doc = "Get the `toBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[wasm_bindgen(method, getter = "toBox")] + pub fn get_to_box(this: &ConvertCoordinateOptions) -> Option; #[cfg(feature = "CssBoxType")] + #[doc = "Change the `toBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] #[wasm_bindgen(method, setter = "toBox")] - fn to_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); + pub fn set_to_box(this: &ConvertCoordinateOptions, val: CssBoxType); } impl ConvertCoordinateOptions { #[doc = "Construct a new `ConvertCoordinateOptions`."] @@ -27,19 +45,15 @@ impl ConvertCoordinateOptions { ret } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `fromBox` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_from_box()` instead."] pub fn from_box(&mut self, val: CssBoxType) -> &mut Self { - self.from_box_shim(val); + self.set_from_box(val); self } #[cfg(feature = "CssBoxType")] - #[doc = "Change the `toBox` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + #[deprecated = "Use `set_to_box()` instead."] pub fn to_box(&mut self, val: CssBoxType) -> &mut Self { - self.to_box_shim(val); + self.set_to_box(val); self } } diff --git a/crates/web-sys/src/features/gen_ConvolverOptions.rs b/crates/web-sys/src/features/gen_ConvolverOptions.rs index db3fe68d2f5..e53480644c4 100644 --- a/crates/web-sys/src/features/gen_ConvolverOptions.rs +++ b/crates/web-sys/src/features/gen_ConvolverOptions.rs @@ -10,19 +10,62 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] pub type ConvolverOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &ConvolverOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ConvolverOptions, val: u32); + pub fn set_channel_count(this: &ConvolverOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &ConvolverOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ConvolverOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &ConvolverOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &ConvolverOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ConvolverOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &ConvolverOptions, val: ChannelInterpretation); #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] + #[wasm_bindgen(method, getter = "buffer")] + pub fn get_buffer(this: &ConvolverOptions) -> Option; + #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &ConvolverOptions, val: Option<&AudioBuffer>); + pub fn set_buffer(this: &ConvolverOptions, val: Option<&AudioBuffer>); + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[wasm_bindgen(method, getter = "disableNormalization")] + pub fn get_disable_normalization(this: &ConvolverOptions) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &ConvolverOptions, val: bool); + pub fn set_disable_normalization(this: &ConvolverOptions, val: bool); } impl ConvolverOptions { #[doc = "Construct a new `ConvolverOptions`."] @@ -33,42 +76,32 @@ impl ConvolverOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { - self.buffer_shim(val); + self.set_buffer(val); self } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization(val); self } } diff --git a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs index f9366322156..67aadd91e6f 100644 --- a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs @@ -11,11 +11,34 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"] pub type CredentialCreationOptions; #[cfg(feature = "PublicKeyCredentialCreationOptions")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "publicKey")] + pub fn get_public_key( + this: &CredentialCreationOptions, + ) -> Option; + #[cfg(feature = "PublicKeyCredentialCreationOptions")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CredentialCreationOptions, val: &PublicKeyCredentialCreationOptions); + pub fn set_public_key( + this: &CredentialCreationOptions, + val: &PublicKeyCredentialCreationOptions, + ); + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &CredentialCreationOptions) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &CredentialCreationOptions, val: &AbortSignal); + pub fn set_signal(this: &CredentialCreationOptions, val: &AbortSignal); } impl CredentialCreationOptions { #[doc = "Construct a new `CredentialCreationOptions`."] @@ -27,19 +50,15 @@ impl CredentialCreationOptions { ret } #[cfg(feature = "PublicKeyCredentialCreationOptions")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &PublicKeyCredentialCreationOptions) -> &mut Self { - self.public_key_shim(val); + self.set_public_key(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs index 6df51ff0ab1..2d2d0e18711 100644 --- a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs @@ -11,11 +11,31 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`*"] pub type CredentialRequestOptions; #[cfg(feature = "PublicKeyCredentialRequestOptions")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "publicKey")] + pub fn get_public_key( + this: &CredentialRequestOptions, + ) -> Option; + #[cfg(feature = "PublicKeyCredentialRequestOptions")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions); + pub fn set_public_key(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions); + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &CredentialRequestOptions) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &CredentialRequestOptions, val: &AbortSignal); + pub fn set_signal(this: &CredentialRequestOptions, val: &AbortSignal); } impl CredentialRequestOptions { #[doc = "Construct a new `CredentialRequestOptions`."] @@ -27,19 +47,15 @@ impl CredentialRequestOptions { ret } #[cfg(feature = "PublicKeyCredentialRequestOptions")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &PublicKeyCredentialRequestOptions) -> &mut Self { - self.public_key_shim(val); + self.set_public_key(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_CryptoKeyPair.rs b/crates/web-sys/src/features/gen_CryptoKeyPair.rs index 2edbf68355b..fdd078a2e64 100644 --- a/crates/web-sys/src/features/gen_CryptoKeyPair.rs +++ b/crates/web-sys/src/features/gen_CryptoKeyPair.rs @@ -11,11 +11,29 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CryptoKeyPair`*"] pub type CryptoKeyPair; #[cfg(feature = "CryptoKey")] + #[doc = "Get the `privateKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[wasm_bindgen(method, getter = "privateKey")] + pub fn get_private_key(this: &CryptoKeyPair) -> CryptoKey; + #[cfg(feature = "CryptoKey")] + #[doc = "Change the `privateKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] #[wasm_bindgen(method, setter = "privateKey")] - fn private_key_shim(this: &CryptoKeyPair, val: &CryptoKey); + pub fn set_private_key(this: &CryptoKeyPair, val: &CryptoKey); + #[cfg(feature = "CryptoKey")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[wasm_bindgen(method, getter = "publicKey")] + pub fn get_public_key(this: &CryptoKeyPair) -> CryptoKey; #[cfg(feature = "CryptoKey")] + #[doc = "Change the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CryptoKeyPair, val: &CryptoKey); + pub fn set_public_key(this: &CryptoKeyPair, val: &CryptoKey); } impl CryptoKeyPair { #[cfg(feature = "CryptoKey")] @@ -30,19 +48,15 @@ impl CryptoKeyPair { ret } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `privateKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[deprecated = "Use `set_private_key()` instead."] pub fn private_key(&mut self, val: &CryptoKey) -> &mut Self { - self.private_key_shim(val); + self.set_private_key(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `publicKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + #[deprecated = "Use `set_public_key()` instead."] pub fn public_key(&mut self, val: &CryptoKey) -> &mut Self { - self.public_key_shim(val); + self.set_public_key(val); self } } diff --git a/crates/web-sys/src/features/gen_CustomEventInit.rs b/crates/web-sys/src/features/gen_CustomEventInit.rs index aaeb6d7a4d7..b9f8dc37f6d 100644 --- a/crates/web-sys/src/features/gen_CustomEventInit.rs +++ b/crates/web-sys/src/features/gen_CustomEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub type CustomEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &CustomEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CustomEventInit, val: bool); + pub fn set_bubbles(this: &CustomEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &CustomEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CustomEventInit, val: bool); + pub fn set_cancelable(this: &CustomEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &CustomEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CustomEventInit, val: bool); + pub fn set_composed(this: &CustomEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &CustomEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_detail(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); } impl CustomEventInit { #[doc = "Construct a new `CustomEventInit`."] @@ -28,32 +60,24 @@ impl CustomEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } } diff --git a/crates/web-sys/src/features/gen_DateTimeValue.rs b/crates/web-sys/src/features/gen_DateTimeValue.rs index e156222ec16..2d374919524 100644 --- a/crates/web-sys/src/features/gen_DateTimeValue.rs +++ b/crates/web-sys/src/features/gen_DateTimeValue.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub type DateTimeValue; + #[doc = "Get the `day` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[wasm_bindgen(method, getter = "day")] + pub fn get_day(this: &DateTimeValue) -> Option; + #[doc = "Change the `day` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "day")] - fn day_shim(this: &DateTimeValue, val: i32); + pub fn set_day(this: &DateTimeValue, val: i32); + #[doc = "Get the `hour` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[wasm_bindgen(method, getter = "hour")] + pub fn get_hour(this: &DateTimeValue) -> Option; + #[doc = "Change the `hour` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "hour")] - fn hour_shim(this: &DateTimeValue, val: i32); + pub fn set_hour(this: &DateTimeValue, val: i32); + #[doc = "Get the `minute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[wasm_bindgen(method, getter = "minute")] + pub fn get_minute(this: &DateTimeValue) -> Option; + #[doc = "Change the `minute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "minute")] - fn minute_shim(this: &DateTimeValue, val: i32); + pub fn set_minute(this: &DateTimeValue, val: i32); + #[doc = "Get the `month` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[wasm_bindgen(method, getter = "month")] + pub fn get_month(this: &DateTimeValue) -> Option; + #[doc = "Change the `month` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "month")] - fn month_shim(this: &DateTimeValue, val: i32); + pub fn set_month(this: &DateTimeValue, val: i32); + #[doc = "Get the `year` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[wasm_bindgen(method, getter = "year")] + pub fn get_year(this: &DateTimeValue) -> Option; + #[doc = "Change the `year` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] #[wasm_bindgen(method, setter = "year")] - fn year_shim(this: &DateTimeValue, val: i32); + pub fn set_year(this: &DateTimeValue, val: i32); } impl DateTimeValue { #[doc = "Construct a new `DateTimeValue`."] @@ -30,39 +70,29 @@ impl DateTimeValue { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `day` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_day()` instead."] pub fn day(&mut self, val: i32) -> &mut Self { - self.day_shim(val); + self.set_day(val); self } - #[doc = "Change the `hour` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_hour()` instead."] pub fn hour(&mut self, val: i32) -> &mut Self { - self.hour_shim(val); + self.set_hour(val); self } - #[doc = "Change the `minute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_minute()` instead."] pub fn minute(&mut self, val: i32) -> &mut Self { - self.minute_shim(val); + self.set_minute(val); self } - #[doc = "Change the `month` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_month()` instead."] pub fn month(&mut self, val: i32) -> &mut Self { - self.month_shim(val); + self.set_month(val); self } - #[doc = "Change the `year` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + #[deprecated = "Use `set_year()` instead."] pub fn year(&mut self, val: i32) -> &mut Self { - self.year_shim(val); + self.set_year(val); self } } diff --git a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs index ff00d5bc28a..bbd77e5cfeb 100644 --- a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs +++ b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs @@ -10,21 +10,78 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub type DecoderDoctorNotification; + #[doc = "Get the `decodeIssue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "decodeIssue")] + pub fn get_decode_issue(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `decodeIssue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "decodeIssue")] - fn decode_issue_shim(this: &DecoderDoctorNotification, val: &str); + pub fn set_decode_issue(this: &DecoderDoctorNotification, val: &str); + #[doc = "Get the `decoderDoctorReportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "decoderDoctorReportId")] + pub fn get_decoder_doctor_report_id(this: &DecoderDoctorNotification) -> String; + #[doc = "Change the `decoderDoctorReportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "decoderDoctorReportId")] - fn decoder_doctor_report_id_shim(this: &DecoderDoctorNotification, val: &str); + pub fn set_decoder_doctor_report_id(this: &DecoderDoctorNotification, val: &str); + #[doc = "Get the `docURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "docURL")] + pub fn get_doc_url(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `docURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "docURL")] - fn doc_url_shim(this: &DecoderDoctorNotification, val: &str); + pub fn set_doc_url(this: &DecoderDoctorNotification, val: &str); + #[doc = "Get the `formats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "formats")] + pub fn get_formats(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `formats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "formats")] - fn formats_shim(this: &DecoderDoctorNotification, val: &str); + pub fn set_formats(this: &DecoderDoctorNotification, val: &str); + #[doc = "Get the `isSolved` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "isSolved")] + pub fn get_is_solved(this: &DecoderDoctorNotification) -> bool; + #[doc = "Change the `isSolved` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "isSolved")] - fn is_solved_shim(this: &DecoderDoctorNotification, val: bool); + pub fn set_is_solved(this: &DecoderDoctorNotification, val: bool); + #[doc = "Get the `resourceURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[wasm_bindgen(method, getter = "resourceURL")] + pub fn get_resource_url(this: &DecoderDoctorNotification) -> Option; + #[doc = "Change the `resourceURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] #[wasm_bindgen(method, setter = "resourceURL")] - fn resource_url_shim(this: &DecoderDoctorNotification, val: &str); + pub fn set_resource_url(this: &DecoderDoctorNotification, val: &str); + #[cfg(feature = "DecoderDoctorNotificationType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &DecoderDoctorNotification) -> DecoderDoctorNotificationType; #[cfg(feature = "DecoderDoctorNotificationType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); + pub fn set_type(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); } impl DecoderDoctorNotification { #[cfg(feature = "DecoderDoctorNotificationType")] @@ -43,54 +100,40 @@ impl DecoderDoctorNotification { ret.type_(type_); ret } - #[doc = "Change the `decodeIssue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_decode_issue()` instead."] pub fn decode_issue(&mut self, val: &str) -> &mut Self { - self.decode_issue_shim(val); + self.set_decode_issue(val); self } - #[doc = "Change the `decoderDoctorReportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_decoder_doctor_report_id()` instead."] pub fn decoder_doctor_report_id(&mut self, val: &str) -> &mut Self { - self.decoder_doctor_report_id_shim(val); + self.set_decoder_doctor_report_id(val); self } - #[doc = "Change the `docURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_doc_url()` instead."] pub fn doc_url(&mut self, val: &str) -> &mut Self { - self.doc_url_shim(val); + self.set_doc_url(val); self } - #[doc = "Change the `formats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_formats()` instead."] pub fn formats(&mut self, val: &str) -> &mut Self { - self.formats_shim(val); + self.set_formats(val); self } - #[doc = "Change the `isSolved` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_is_solved()` instead."] pub fn is_solved(&mut self, val: bool) -> &mut Self { - self.is_solved_shim(val); + self.set_is_solved(val); self } - #[doc = "Change the `resourceURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + #[deprecated = "Use `set_resource_url()` instead."] pub fn resource_url(&mut self, val: &str) -> &mut Self { - self.resource_url_shim(val); + self.set_resource_url(val); self } #[cfg(feature = "DecoderDoctorNotificationType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: DecoderDoctorNotificationType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_DelayOptions.rs b/crates/web-sys/src/features/gen_DelayOptions.rs index 02afb9d4bf3..2228e7e529b 100644 --- a/crates/web-sys/src/features/gen_DelayOptions.rs +++ b/crates/web-sys/src/features/gen_DelayOptions.rs @@ -10,18 +10,60 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] pub type DelayOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &DelayOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &DelayOptions, val: u32); + pub fn set_channel_count(this: &DelayOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &DelayOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &DelayOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &DelayOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &DelayOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &DelayOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &DelayOptions, val: ChannelInterpretation); + #[doc = "Get the `delayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[wasm_bindgen(method, getter = "delayTime")] + pub fn get_delay_time(this: &DelayOptions) -> Option; + #[doc = "Change the `delayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "delayTime")] - fn delay_time_shim(this: &DelayOptions, val: f64); + pub fn set_delay_time(this: &DelayOptions, val: f64); + #[doc = "Get the `maxDelayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[wasm_bindgen(method, getter = "maxDelayTime")] + pub fn get_max_delay_time(this: &DelayOptions) -> Option; + #[doc = "Change the `maxDelayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] #[wasm_bindgen(method, setter = "maxDelayTime")] - fn max_delay_time_shim(this: &DelayOptions, val: f64); + pub fn set_max_delay_time(this: &DelayOptions, val: f64); } impl DelayOptions { #[doc = "Construct a new `DelayOptions`."] @@ -32,41 +74,31 @@ impl DelayOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `delayTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_delay_time()` instead."] pub fn delay_time(&mut self, val: f64) -> &mut Self { - self.delay_time_shim(val); + self.set_delay_time(val); self } - #[doc = "Change the `maxDelayTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + #[deprecated = "Use `set_max_delay_time()` instead."] pub fn max_delay_time(&mut self, val: f64) -> &mut Self { - self.max_delay_time_shim(val); + self.set_max_delay_time(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs index f94475e8d2e..ca98e86bb70 100644 --- a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs +++ b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] pub type DeviceAccelerationInit; + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DeviceAccelerationInit, val: Option); + pub fn set_x(this: &DeviceAccelerationInit, val: Option); + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DeviceAccelerationInit, val: Option); + pub fn set_y(this: &DeviceAccelerationInit, val: Option); + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[wasm_bindgen(method, getter = "z")] + pub fn get_z(this: &DeviceAccelerationInit) -> Option; + #[doc = "Change the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &DeviceAccelerationInit, val: Option); + pub fn set_z(this: &DeviceAccelerationInit, val: Option); } impl DeviceAccelerationInit { #[doc = "Construct a new `DeviceAccelerationInit`."] @@ -26,25 +50,19 @@ impl DeviceAccelerationInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: Option) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: Option) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } - #[doc = "Change the `z` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: Option) -> &mut Self { - self.z_shim(val); + self.set_z(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs index 61ab42345bb..8aa438238e0 100644 --- a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub type DeviceLightEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceLightEventInit, val: bool); + pub fn set_bubbles(this: &DeviceLightEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceLightEventInit, val: bool); + pub fn set_cancelable(this: &DeviceLightEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceLightEventInit, val: bool); + pub fn set_composed(this: &DeviceLightEventInit, val: bool); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &DeviceLightEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &DeviceLightEventInit, val: f64); + pub fn set_value(this: &DeviceLightEventInit, val: f64); } impl DeviceLightEventInit { #[doc = "Construct a new `DeviceLightEventInit`."] @@ -28,32 +60,24 @@ impl DeviceLightEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs index 43ed16d21fe..6f46ea20a4d 100644 --- a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs @@ -10,26 +10,87 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub type DeviceMotionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceMotionEventInit, val: bool); + pub fn set_bubbles(this: &DeviceMotionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceMotionEventInit, val: bool); + pub fn set_cancelable(this: &DeviceMotionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceMotionEventInit, val: bool); + pub fn set_composed(this: &DeviceMotionEventInit, val: bool); #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Get the `acceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "acceleration")] + pub fn get_acceleration(this: &DeviceMotionEventInit) -> Option; + #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Change the `acceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "acceleration")] - fn acceleration_shim(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); + pub fn set_acceleration(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Get the `accelerationIncludingGravity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "accelerationIncludingGravity")] + pub fn get_acceleration_including_gravity( + this: &DeviceMotionEventInit, + ) -> Option; + #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Change the `accelerationIncludingGravity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "accelerationIncludingGravity")] - fn acceleration_including_gravity_shim( + pub fn set_acceleration_including_gravity( this: &DeviceMotionEventInit, val: &DeviceAccelerationInit, ); + #[doc = "Get the `interval` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[wasm_bindgen(method, getter = "interval")] + pub fn get_interval(this: &DeviceMotionEventInit) -> Option; + #[doc = "Change the `interval` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] #[wasm_bindgen(method, setter = "interval")] - fn interval_shim(this: &DeviceMotionEventInit, val: Option); + pub fn set_interval(this: &DeviceMotionEventInit, val: Option); + #[cfg(feature = "DeviceRotationRateInit")] + #[doc = "Get the `rotationRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] + #[wasm_bindgen(method, getter = "rotationRate")] + pub fn get_rotation_rate(this: &DeviceMotionEventInit) -> Option; #[cfg(feature = "DeviceRotationRateInit")] + #[doc = "Change the `rotationRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "rotationRate")] - fn rotation_rate_shim(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); + pub fn set_rotation_rate(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); } impl DeviceMotionEventInit { #[doc = "Construct a new `DeviceMotionEventInit`."] @@ -40,56 +101,42 @@ impl DeviceMotionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "DeviceAccelerationInit")] - #[doc = "Change the `acceleration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_acceleration()` instead."] pub fn acceleration(&mut self, val: &DeviceAccelerationInit) -> &mut Self { - self.acceleration_shim(val); + self.set_acceleration(val); self } #[cfg(feature = "DeviceAccelerationInit")] - #[doc = "Change the `accelerationIncludingGravity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_acceleration_including_gravity()` instead."] pub fn acceleration_including_gravity(&mut self, val: &DeviceAccelerationInit) -> &mut Self { - self.acceleration_including_gravity_shim(val); + self.set_acceleration_including_gravity(val); self } - #[doc = "Change the `interval` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + #[deprecated = "Use `set_interval()` instead."] pub fn interval(&mut self, val: Option) -> &mut Self { - self.interval_shim(val); + self.set_interval(val); self } #[cfg(feature = "DeviceRotationRateInit")] - #[doc = "Change the `rotationRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_rotation_rate()` instead."] pub fn rotation_rate(&mut self, val: &DeviceRotationRateInit) -> &mut Self { - self.rotation_rate_shim(val); + self.set_rotation_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs index 0baef9e2c32..5570bf982a0 100644 --- a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs @@ -10,20 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub type DeviceOrientationEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceOrientationEventInit, val: bool); + pub fn set_bubbles(this: &DeviceOrientationEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceOrientationEventInit, val: bool); + pub fn set_cancelable(this: &DeviceOrientationEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceOrientationEventInit, val: bool); + pub fn set_composed(this: &DeviceOrientationEventInit, val: bool); + #[doc = "Get the `absolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "absolute")] + pub fn get_absolute(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `absolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "absolute")] - fn absolute_shim(this: &DeviceOrientationEventInit, val: bool); + pub fn set_absolute(this: &DeviceOrientationEventInit, val: bool); + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &DeviceOrientationEventInit, val: Option); + pub fn set_alpha(this: &DeviceOrientationEventInit, val: Option); + #[doc = "Get the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "beta")] + pub fn get_beta(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "beta")] - fn beta_shim(this: &DeviceOrientationEventInit, val: Option); + pub fn set_beta(this: &DeviceOrientationEventInit, val: Option); + #[doc = "Get the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[wasm_bindgen(method, getter = "gamma")] + pub fn get_gamma(this: &DeviceOrientationEventInit) -> Option; + #[doc = "Change the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] #[wasm_bindgen(method, setter = "gamma")] - fn gamma_shim(this: &DeviceOrientationEventInit, val: Option); + pub fn set_gamma(this: &DeviceOrientationEventInit, val: Option); } impl DeviceOrientationEventInit { #[doc = "Construct a new `DeviceOrientationEventInit`."] @@ -34,53 +90,39 @@ impl DeviceOrientationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `absolute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_absolute()` instead."] pub fn absolute(&mut self, val: bool) -> &mut Self { - self.absolute_shim(val); + self.set_absolute(val); self } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: Option) -> &mut Self { - self.alpha_shim(val); + self.set_alpha(val); self } - #[doc = "Change the `beta` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_beta()` instead."] pub fn beta(&mut self, val: Option) -> &mut Self { - self.beta_shim(val); + self.set_beta(val); self } - #[doc = "Change the `gamma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + #[deprecated = "Use `set_gamma()` instead."] pub fn gamma(&mut self, val: Option) -> &mut Self { - self.gamma_shim(val); + self.set_gamma(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs index f93f58341f8..d63d3350759 100644 --- a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub type DeviceProximityEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceProximityEventInit, val: bool); + pub fn set_bubbles(this: &DeviceProximityEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceProximityEventInit, val: bool); + pub fn set_cancelable(this: &DeviceProximityEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceProximityEventInit, val: bool); + pub fn set_composed(this: &DeviceProximityEventInit, val: bool); + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "max")] + pub fn get_max(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &DeviceProximityEventInit, val: f64); + pub fn set_max(this: &DeviceProximityEventInit, val: f64); + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "min")] + pub fn get_min(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &DeviceProximityEventInit, val: f64); + pub fn set_min(this: &DeviceProximityEventInit, val: f64); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &DeviceProximityEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &DeviceProximityEventInit, val: f64); + pub fn set_value(this: &DeviceProximityEventInit, val: f64); } impl DeviceProximityEventInit { #[doc = "Construct a new `DeviceProximityEventInit`."] @@ -32,46 +80,34 @@ impl DeviceProximityEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { - self.max_shim(val); + self.set_max(val); self } - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { - self.min_shim(val); + self.set_min(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs index 5f8cf0a712a..84272777672 100644 --- a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs +++ b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] pub type DeviceRotationRateInit; + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &DeviceRotationRateInit, val: Option); + pub fn set_alpha(this: &DeviceRotationRateInit, val: Option); + #[doc = "Get the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[wasm_bindgen(method, getter = "beta")] + pub fn get_beta(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "beta")] - fn beta_shim(this: &DeviceRotationRateInit, val: Option); + pub fn set_beta(this: &DeviceRotationRateInit, val: Option); + #[doc = "Get the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[wasm_bindgen(method, getter = "gamma")] + pub fn get_gamma(this: &DeviceRotationRateInit) -> Option; + #[doc = "Change the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] #[wasm_bindgen(method, setter = "gamma")] - fn gamma_shim(this: &DeviceRotationRateInit, val: Option); + pub fn set_gamma(this: &DeviceRotationRateInit, val: Option); } impl DeviceRotationRateInit { #[doc = "Construct a new `DeviceRotationRateInit`."] @@ -26,25 +50,19 @@ impl DeviceRotationRateInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: Option) -> &mut Self { - self.alpha_shim(val); + self.set_alpha(val); self } - #[doc = "Change the `beta` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_beta()` instead."] pub fn beta(&mut self, val: Option) -> &mut Self { - self.beta_shim(val); + self.set_beta(val); self } - #[doc = "Change the `gamma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + #[deprecated = "Use `set_gamma()` instead."] pub fn gamma(&mut self, val: Option) -> &mut Self { - self.gamma_shim(val); + self.set_gamma(val); self } } diff --git a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs index a72d6f55817..323ac4159d7 100644 --- a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] pub type DhKeyDeriveParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &DhKeyDeriveParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &DhKeyDeriveParams, val: &str); + pub fn set_name(this: &DhKeyDeriveParams, val: &str); #[cfg(feature = "CryptoKey")] + #[doc = "Get the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] + #[wasm_bindgen(method, getter = "public")] + pub fn get_public(this: &DhKeyDeriveParams) -> CryptoKey; + #[cfg(feature = "CryptoKey")] + #[doc = "Change the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "public")] - fn public_shim(this: &DhKeyDeriveParams, val: &CryptoKey); + pub fn set_public(this: &DhKeyDeriveParams, val: &CryptoKey); } impl DhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -28,19 +45,15 @@ impl DhKeyDeriveParams { ret.public(public); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `public` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] + #[deprecated = "Use `set_public()` instead."] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { - self.public_shim(val); + self.set_public(val); self } } diff --git a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs index 5abcb4cedb6..ba0c9ee0569 100644 --- a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs +++ b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type DirectoryPickerOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &DirectoryPickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &DirectoryPickerOptions, val: &str); + pub fn set_id(this: &DirectoryPickerOptions, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &DirectoryPickerOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); + pub fn set_mode(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "startIn")] + pub fn get_start_in(this: &DirectoryPickerOptions) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); + pub fn set_start_in(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl DirectoryPickerOptions { @@ -36,37 +85,22 @@ impl DirectoryPickerOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `startIn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_start_in()` instead."] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); + self.set_start_in(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs index 993d493b46d..814a1279c88 100644 --- a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] pub type DisplayMediaStreamConstraints; + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "audio")] + pub fn get_audio(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_audio(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "video")] + pub fn get_video(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_video(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); } impl DisplayMediaStreamConstraints { #[doc = "Construct a new `DisplayMediaStreamConstraints`."] @@ -24,18 +40,14 @@ impl DisplayMediaStreamConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_shim(val); + self.set_audio(val); self } - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_shim(val); + self.set_video(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayNameOptions.rs b/crates/web-sys/src/features/gen_DisplayNameOptions.rs index bddb9923a34..837d9ecad1a 100644 --- a/crates/web-sys/src/features/gen_DisplayNameOptions.rs +++ b/crates/web-sys/src/features/gen_DisplayNameOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] pub type DisplayNameOptions; + #[doc = "Get the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[wasm_bindgen(method, getter = "keys")] + pub fn get_keys(this: &DisplayNameOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, setter = "keys")] - fn keys_shim(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); + pub fn set_keys(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[wasm_bindgen(method, getter = "style")] + pub fn get_style(this: &DisplayNameOptions) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &DisplayNameOptions, val: &str); + pub fn set_style(this: &DisplayNameOptions, val: &str); } impl DisplayNameOptions { #[doc = "Construct a new `DisplayNameOptions`."] @@ -24,18 +40,14 @@ impl DisplayNameOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `keys` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[deprecated = "Use `set_keys()` instead."] pub fn keys(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.keys_shim(val); + self.set_keys(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayNameResult.rs b/crates/web-sys/src/features/gen_DisplayNameResult.rs index fcee8ccffb2..bfb8507ddd5 100644 --- a/crates/web-sys/src/features/gen_DisplayNameResult.rs +++ b/crates/web-sys/src/features/gen_DisplayNameResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] pub type DisplayNameResult; + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[wasm_bindgen(method, getter = "locale")] + pub fn get_locale(this: &DisplayNameResult) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &DisplayNameResult, val: &str); + pub fn set_locale(this: &DisplayNameResult, val: &str); + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[wasm_bindgen(method, getter = "style")] + pub fn get_style(this: &DisplayNameResult) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &DisplayNameResult, val: &str); + pub fn set_style(this: &DisplayNameResult, val: &str); } impl DisplayNameResult { #[doc = "Construct a new `DisplayNameResult`."] @@ -24,18 +40,14 @@ impl DisplayNameResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: &str) -> &mut Self { - self.locale_shim(val); + self.set_locale(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsCacheDict.rs b/crates/web-sys/src/features/gen_DnsCacheDict.rs index e16b2c6b833..a6467078f67 100644 --- a/crates/web-sys/src/features/gen_DnsCacheDict.rs +++ b/crates/web-sys/src/features/gen_DnsCacheDict.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] pub type DnsCacheDict; + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] + #[wasm_bindgen(method, getter = "entries")] + pub fn get_entries(this: &DnsCacheDict) -> Option<::js_sys::Array>; + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); } impl DnsCacheDict { #[doc = "Construct a new `DnsCacheDict`."] @@ -22,11 +30,9 @@ impl DnsCacheDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsCacheEntry.rs b/crates/web-sys/src/features/gen_DnsCacheEntry.rs index ad86c2a5b0e..54d837685fc 100644 --- a/crates/web-sys/src/features/gen_DnsCacheEntry.rs +++ b/crates/web-sys/src/features/gen_DnsCacheEntry.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub type DnsCacheEntry; + #[doc = "Get the `expiration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[wasm_bindgen(method, getter = "expiration")] + pub fn get_expiration(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `expiration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "expiration")] - fn expiration_shim(this: &DnsCacheEntry, val: f64); + pub fn set_expiration(this: &DnsCacheEntry, val: f64); + #[doc = "Get the `family` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[wasm_bindgen(method, getter = "family")] + pub fn get_family(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `family` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "family")] - fn family_shim(this: &DnsCacheEntry, val: &str); + pub fn set_family(this: &DnsCacheEntry, val: &str); + #[doc = "Get the `hostaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[wasm_bindgen(method, getter = "hostaddr")] + pub fn get_hostaddr(this: &DnsCacheEntry) -> Option<::js_sys::Array>; + #[doc = "Change the `hostaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "hostaddr")] - fn hostaddr_shim(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); + pub fn set_hostaddr(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `hostname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[wasm_bindgen(method, getter = "hostname")] + pub fn get_hostname(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `hostname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "hostname")] - fn hostname_shim(this: &DnsCacheEntry, val: &str); + pub fn set_hostname(this: &DnsCacheEntry, val: &str); + #[doc = "Get the `trr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[wasm_bindgen(method, getter = "trr")] + pub fn get_trr(this: &DnsCacheEntry) -> Option; + #[doc = "Change the `trr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] #[wasm_bindgen(method, setter = "trr")] - fn trr_shim(this: &DnsCacheEntry, val: bool); + pub fn set_trr(this: &DnsCacheEntry, val: bool); } impl DnsCacheEntry { #[doc = "Construct a new `DnsCacheEntry`."] @@ -30,39 +70,29 @@ impl DnsCacheEntry { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `expiration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_expiration()` instead."] pub fn expiration(&mut self, val: f64) -> &mut Self { - self.expiration_shim(val); + self.set_expiration(val); self } - #[doc = "Change the `family` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_family()` instead."] pub fn family(&mut self, val: &str) -> &mut Self { - self.family_shim(val); + self.set_family(val); self } - #[doc = "Change the `hostaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_hostaddr()` instead."] pub fn hostaddr(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hostaddr_shim(val); + self.set_hostaddr(val); self } - #[doc = "Change the `hostname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_hostname()` instead."] pub fn hostname(&mut self, val: &str) -> &mut Self { - self.hostname_shim(val); + self.set_hostname(val); self } - #[doc = "Change the `trr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + #[deprecated = "Use `set_trr()` instead."] pub fn trr(&mut self, val: bool) -> &mut Self { - self.trr_shim(val); + self.set_trr(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsLookupDict.rs b/crates/web-sys/src/features/gen_DnsLookupDict.rs index 22e646160e8..3a40b3dac60 100644 --- a/crates/web-sys/src/features/gen_DnsLookupDict.rs +++ b/crates/web-sys/src/features/gen_DnsLookupDict.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] pub type DnsLookupDict; + #[doc = "Get the `address` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[wasm_bindgen(method, getter = "address")] + pub fn get_address(this: &DnsLookupDict) -> Option<::js_sys::Array>; + #[doc = "Change the `address` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "address")] - fn address_shim(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); + pub fn set_address(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `answer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[wasm_bindgen(method, getter = "answer")] + pub fn get_answer(this: &DnsLookupDict) -> Option; + #[doc = "Change the `answer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "answer")] - fn answer_shim(this: &DnsLookupDict, val: bool); + pub fn set_answer(this: &DnsLookupDict, val: bool); + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &DnsLookupDict) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &DnsLookupDict, val: &str); + pub fn set_error(this: &DnsLookupDict, val: &str); } impl DnsLookupDict { #[doc = "Construct a new `DnsLookupDict`."] @@ -26,25 +50,19 @@ impl DnsLookupDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `address` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_address()` instead."] pub fn address(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.address_shim(val); + self.set_address(val); self } - #[doc = "Change the `answer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_answer()` instead."] pub fn answer(&mut self, val: bool) -> &mut Self { - self.answer_shim(val); + self.set_answer(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } } diff --git a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs index 5cbf8c1a181..116bf1075b7 100644 --- a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs +++ b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] pub type DocumentTimelineOptions; + #[doc = "Get the `originTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] + #[wasm_bindgen(method, getter = "originTime")] + pub fn get_origin_time(this: &DocumentTimelineOptions) -> Option; + #[doc = "Change the `originTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] #[wasm_bindgen(method, setter = "originTime")] - fn origin_time_shim(this: &DocumentTimelineOptions, val: f64); + pub fn set_origin_time(this: &DocumentTimelineOptions, val: f64); } impl DocumentTimelineOptions { #[doc = "Construct a new `DocumentTimelineOptions`."] @@ -22,11 +30,9 @@ impl DocumentTimelineOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `originTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] + #[deprecated = "Use `set_origin_time()` instead."] pub fn origin_time(&mut self, val: f64) -> &mut Self { - self.origin_time_shim(val); + self.set_origin_time(val); self } } diff --git a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs index d93e11a0eb9..b3ca99c9931 100644 --- a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs @@ -10,30 +10,126 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub type DomMatrix2dInit; + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "a")] + pub fn get_a(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_a(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "b")] + pub fn get_b(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_b(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "c")] + pub fn get_c(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "c")] - fn c_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_c(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "d")] + pub fn get_d(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_d(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "e")] + pub fn get_e(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_e(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "f")] + pub fn get_f(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "f")] - fn f_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_f(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m11")] + pub fn get_m11(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m11")] - fn m11_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m11(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m12")] + pub fn get_m12(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m12")] - fn m12_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m12(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m21")] + pub fn get_m21(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m21")] - fn m21_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m21(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m22")] + pub fn get_m22(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m22")] - fn m22_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m22(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m41")] + pub fn get_m41(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m41")] - fn m41_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m41(this: &DomMatrix2dInit, val: f64); + #[doc = "Get the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[wasm_bindgen(method, getter = "m42")] + pub fn get_m42(this: &DomMatrix2dInit) -> Option; + #[doc = "Change the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] #[wasm_bindgen(method, setter = "m42")] - fn m42_shim(this: &DomMatrix2dInit, val: f64); + pub fn set_m42(this: &DomMatrix2dInit, val: f64); } impl DomMatrix2dInit { #[doc = "Construct a new `DomMatrix2dInit`."] @@ -44,88 +140,64 @@ impl DomMatrix2dInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a(val); self } - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b(val); self } - #[doc = "Change the `c` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_c()` instead."] pub fn c(&mut self, val: f64) -> &mut Self { - self.c_shim(val); + self.set_c(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: f64) -> &mut Self { - self.d_shim(val); + self.set_d(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: f64) -> &mut Self { - self.e_shim(val); + self.set_e(val); self } - #[doc = "Change the `f` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_f()` instead."] pub fn f(&mut self, val: f64) -> &mut Self { - self.f_shim(val); + self.set_f(val); self } - #[doc = "Change the `m11` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m11()` instead."] pub fn m11(&mut self, val: f64) -> &mut Self { - self.m11_shim(val); + self.set_m11(val); self } - #[doc = "Change the `m12` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m12()` instead."] pub fn m12(&mut self, val: f64) -> &mut Self { - self.m12_shim(val); + self.set_m12(val); self } - #[doc = "Change the `m21` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m21()` instead."] pub fn m21(&mut self, val: f64) -> &mut Self { - self.m21_shim(val); + self.set_m21(val); self } - #[doc = "Change the `m22` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m22()` instead."] pub fn m22(&mut self, val: f64) -> &mut Self { - self.m22_shim(val); + self.set_m22(val); self } - #[doc = "Change the `m41` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m41()` instead."] pub fn m41(&mut self, val: f64) -> &mut Self { - self.m41_shim(val); + self.set_m41(val); self } - #[doc = "Change the `m42` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + #[deprecated = "Use `set_m42()` instead."] pub fn m42(&mut self, val: f64) -> &mut Self { - self.m42_shim(val); + self.set_m42(val); self } } diff --git a/crates/web-sys/src/features/gen_DomMatrixInit.rs b/crates/web-sys/src/features/gen_DomMatrixInit.rs index f1dbe993864..15809896dd0 100644 --- a/crates/web-sys/src/features/gen_DomMatrixInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrixInit.rs @@ -10,52 +10,236 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub type DomMatrixInit; + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "a")] + pub fn get_a(this: &DomMatrixInit) -> Option; + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &DomMatrixInit, val: f64); + pub fn set_a(this: &DomMatrixInit, val: f64); + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "b")] + pub fn get_b(this: &DomMatrixInit) -> Option; + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &DomMatrixInit, val: f64); + pub fn set_b(this: &DomMatrixInit, val: f64); + #[doc = "Get the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "c")] + pub fn get_c(this: &DomMatrixInit) -> Option; + #[doc = "Change the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "c")] - fn c_shim(this: &DomMatrixInit, val: f64); + pub fn set_c(this: &DomMatrixInit, val: f64); + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "d")] + pub fn get_d(this: &DomMatrixInit) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &DomMatrixInit, val: f64); + pub fn set_d(this: &DomMatrixInit, val: f64); + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "e")] + pub fn get_e(this: &DomMatrixInit) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &DomMatrixInit, val: f64); + pub fn set_e(this: &DomMatrixInit, val: f64); + #[doc = "Get the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "f")] + pub fn get_f(this: &DomMatrixInit) -> Option; + #[doc = "Change the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "f")] - fn f_shim(this: &DomMatrixInit, val: f64); + pub fn set_f(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m11")] + pub fn get_m11(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m11")] - fn m11_shim(this: &DomMatrixInit, val: f64); + pub fn set_m11(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m12")] + pub fn get_m12(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m12")] - fn m12_shim(this: &DomMatrixInit, val: f64); + pub fn set_m12(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m21")] + pub fn get_m21(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m21")] - fn m21_shim(this: &DomMatrixInit, val: f64); + pub fn set_m21(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m22")] + pub fn get_m22(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m22")] - fn m22_shim(this: &DomMatrixInit, val: f64); + pub fn set_m22(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m41")] + pub fn get_m41(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m41")] - fn m41_shim(this: &DomMatrixInit, val: f64); + pub fn set_m41(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m42")] + pub fn get_m42(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m42")] - fn m42_shim(this: &DomMatrixInit, val: f64); + pub fn set_m42(this: &DomMatrixInit, val: f64); + #[doc = "Get the `is2D` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "is2D")] + pub fn get_is_2d(this: &DomMatrixInit) -> Option; + #[doc = "Change the `is2D` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "is2D")] - fn is_2d_shim(this: &DomMatrixInit, val: bool); + pub fn set_is_2d(this: &DomMatrixInit, val: bool); + #[doc = "Get the `m13` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m13")] + pub fn get_m13(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m13` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m13")] - fn m13_shim(this: &DomMatrixInit, val: f64); + pub fn set_m13(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m14` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m14")] + pub fn get_m14(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m14` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m14")] - fn m14_shim(this: &DomMatrixInit, val: f64); + pub fn set_m14(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m23` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m23")] + pub fn get_m23(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m23` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m23")] - fn m23_shim(this: &DomMatrixInit, val: f64); + pub fn set_m23(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m24` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m24")] + pub fn get_m24(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m24` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m24")] - fn m24_shim(this: &DomMatrixInit, val: f64); + pub fn set_m24(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m31` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m31")] + pub fn get_m31(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m31` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m31")] - fn m31_shim(this: &DomMatrixInit, val: f64); + pub fn set_m31(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m32` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m32")] + pub fn get_m32(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m32` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m32")] - fn m32_shim(this: &DomMatrixInit, val: f64); + pub fn set_m32(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m33` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m33")] + pub fn get_m33(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m33` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m33")] - fn m33_shim(this: &DomMatrixInit, val: f64); + pub fn set_m33(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m34` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m34")] + pub fn get_m34(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m34` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m34")] - fn m34_shim(this: &DomMatrixInit, val: f64); + pub fn set_m34(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m43` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m43")] + pub fn get_m43(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m43` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m43")] - fn m43_shim(this: &DomMatrixInit, val: f64); + pub fn set_m43(this: &DomMatrixInit, val: f64); + #[doc = "Get the `m44` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[wasm_bindgen(method, getter = "m44")] + pub fn get_m44(this: &DomMatrixInit) -> Option; + #[doc = "Change the `m44` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] #[wasm_bindgen(method, setter = "m44")] - fn m44_shim(this: &DomMatrixInit, val: f64); + pub fn set_m44(this: &DomMatrixInit, val: f64); } impl DomMatrixInit { #[doc = "Construct a new `DomMatrixInit`."] @@ -66,165 +250,119 @@ impl DomMatrixInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a(val); self } - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b(val); self } - #[doc = "Change the `c` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_c()` instead."] pub fn c(&mut self, val: f64) -> &mut Self { - self.c_shim(val); + self.set_c(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: f64) -> &mut Self { - self.d_shim(val); + self.set_d(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: f64) -> &mut Self { - self.e_shim(val); + self.set_e(val); self } - #[doc = "Change the `f` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_f()` instead."] pub fn f(&mut self, val: f64) -> &mut Self { - self.f_shim(val); + self.set_f(val); self } - #[doc = "Change the `m11` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m11()` instead."] pub fn m11(&mut self, val: f64) -> &mut Self { - self.m11_shim(val); + self.set_m11(val); self } - #[doc = "Change the `m12` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m12()` instead."] pub fn m12(&mut self, val: f64) -> &mut Self { - self.m12_shim(val); + self.set_m12(val); self } - #[doc = "Change the `m21` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m21()` instead."] pub fn m21(&mut self, val: f64) -> &mut Self { - self.m21_shim(val); + self.set_m21(val); self } - #[doc = "Change the `m22` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m22()` instead."] pub fn m22(&mut self, val: f64) -> &mut Self { - self.m22_shim(val); + self.set_m22(val); self } - #[doc = "Change the `m41` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m41()` instead."] pub fn m41(&mut self, val: f64) -> &mut Self { - self.m41_shim(val); + self.set_m41(val); self } - #[doc = "Change the `m42` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m42()` instead."] pub fn m42(&mut self, val: f64) -> &mut Self { - self.m42_shim(val); + self.set_m42(val); self } - #[doc = "Change the `is2D` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_is_2d()` instead."] pub fn is_2d(&mut self, val: bool) -> &mut Self { - self.is_2d_shim(val); + self.set_is_2d(val); self } - #[doc = "Change the `m13` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m13()` instead."] pub fn m13(&mut self, val: f64) -> &mut Self { - self.m13_shim(val); + self.set_m13(val); self } - #[doc = "Change the `m14` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m14()` instead."] pub fn m14(&mut self, val: f64) -> &mut Self { - self.m14_shim(val); + self.set_m14(val); self } - #[doc = "Change the `m23` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m23()` instead."] pub fn m23(&mut self, val: f64) -> &mut Self { - self.m23_shim(val); + self.set_m23(val); self } - #[doc = "Change the `m24` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m24()` instead."] pub fn m24(&mut self, val: f64) -> &mut Self { - self.m24_shim(val); + self.set_m24(val); self } - #[doc = "Change the `m31` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m31()` instead."] pub fn m31(&mut self, val: f64) -> &mut Self { - self.m31_shim(val); + self.set_m31(val); self } - #[doc = "Change the `m32` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m32()` instead."] pub fn m32(&mut self, val: f64) -> &mut Self { - self.m32_shim(val); + self.set_m32(val); self } - #[doc = "Change the `m33` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m33()` instead."] pub fn m33(&mut self, val: f64) -> &mut Self { - self.m33_shim(val); + self.set_m33(val); self } - #[doc = "Change the `m34` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m34()` instead."] pub fn m34(&mut self, val: f64) -> &mut Self { - self.m34_shim(val); + self.set_m34(val); self } - #[doc = "Change the `m43` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m43()` instead."] pub fn m43(&mut self, val: f64) -> &mut Self { - self.m43_shim(val); + self.set_m43(val); self } - #[doc = "Change the `m44` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + #[deprecated = "Use `set_m44()` instead."] pub fn m44(&mut self, val: f64) -> &mut Self { - self.m44_shim(val); + self.set_m44(val); self } } diff --git a/crates/web-sys/src/features/gen_DomPointInit.rs b/crates/web-sys/src/features/gen_DomPointInit.rs index 37f3064eb47..b5f58ae1fb0 100644 --- a/crates/web-sys/src/features/gen_DomPointInit.rs +++ b/crates/web-sys/src/features/gen_DomPointInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub type DomPointInit; + #[doc = "Get the `w` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[wasm_bindgen(method, getter = "w")] + pub fn get_w(this: &DomPointInit) -> Option; + #[doc = "Change the `w` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "w")] - fn w_shim(this: &DomPointInit, val: f64); + pub fn set_w(this: &DomPointInit, val: f64); + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &DomPointInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DomPointInit, val: f64); + pub fn set_x(this: &DomPointInit, val: f64); + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &DomPointInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DomPointInit, val: f64); + pub fn set_y(this: &DomPointInit, val: f64); + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[wasm_bindgen(method, getter = "z")] + pub fn get_z(this: &DomPointInit) -> Option; + #[doc = "Change the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &DomPointInit, val: f64); + pub fn set_z(this: &DomPointInit, val: f64); } impl DomPointInit { #[doc = "Construct a new `DomPointInit`."] @@ -28,32 +60,24 @@ impl DomPointInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `w` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_w()` instead."] pub fn w(&mut self, val: f64) -> &mut Self { - self.w_shim(val); + self.set_w(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: f64) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: f64) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } - #[doc = "Change the `z` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: f64) -> &mut Self { - self.z_shim(val); + self.set_z(val); self } } diff --git a/crates/web-sys/src/features/gen_DomQuadInit.rs b/crates/web-sys/src/features/gen_DomQuadInit.rs index b9af8996627..113f80350e0 100644 --- a/crates/web-sys/src/features/gen_DomQuadInit.rs +++ b/crates/web-sys/src/features/gen_DomQuadInit.rs @@ -11,17 +11,53 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"] pub type DomQuadInit; #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[wasm_bindgen(method, getter = "p1")] + pub fn get_p1(this: &DomQuadInit) -> Option; + #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p1")] - fn p1_shim(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p1(this: &DomQuadInit, val: &DomPointInit); + #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[wasm_bindgen(method, getter = "p2")] + pub fn get_p2(this: &DomQuadInit) -> Option; #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p2")] - fn p2_shim(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p2(this: &DomQuadInit, val: &DomPointInit); #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[wasm_bindgen(method, getter = "p3")] + pub fn get_p3(this: &DomQuadInit) -> Option; + #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p3")] - fn p3_shim(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p3(this: &DomQuadInit, val: &DomPointInit); #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[wasm_bindgen(method, getter = "p4")] + pub fn get_p4(this: &DomQuadInit) -> Option; + #[cfg(feature = "DomPointInit")] + #[doc = "Change the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] #[wasm_bindgen(method, setter = "p4")] - fn p4_shim(this: &DomQuadInit, val: &DomPointInit); + pub fn set_p4(this: &DomQuadInit, val: &DomPointInit); } impl DomQuadInit { #[doc = "Construct a new `DomQuadInit`."] @@ -33,35 +69,27 @@ impl DomQuadInit { ret } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p1()` instead."] pub fn p1(&mut self, val: &DomPointInit) -> &mut Self { - self.p1_shim(val); + self.set_p1(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p2()` instead."] pub fn p2(&mut self, val: &DomPointInit) -> &mut Self { - self.p2_shim(val); + self.set_p2(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p3` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p3()` instead."] pub fn p3(&mut self, val: &DomPointInit) -> &mut Self { - self.p3_shim(val); + self.set_p3(val); self } #[cfg(feature = "DomPointInit")] - #[doc = "Change the `p4` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + #[deprecated = "Use `set_p4()` instead."] pub fn p4(&mut self, val: &DomPointInit) -> &mut Self { - self.p4_shim(val); + self.set_p4(val); self } } diff --git a/crates/web-sys/src/features/gen_DomQuadJson.rs b/crates/web-sys/src/features/gen_DomQuadJson.rs index d02f9daa85d..2bba1e24bd7 100644 --- a/crates/web-sys/src/features/gen_DomQuadJson.rs +++ b/crates/web-sys/src/features/gen_DomQuadJson.rs @@ -11,17 +11,53 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomQuadJson`*"] pub type DomQuadJson; #[cfg(feature = "DomPoint")] + #[doc = "Get the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[wasm_bindgen(method, getter = "p1")] + pub fn get_p1(this: &DomQuadJson) -> Option; + #[cfg(feature = "DomPoint")] + #[doc = "Change the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p1")] - fn p1_shim(this: &DomQuadJson, val: &DomPoint); + pub fn set_p1(this: &DomQuadJson, val: &DomPoint); + #[cfg(feature = "DomPoint")] + #[doc = "Get the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[wasm_bindgen(method, getter = "p2")] + pub fn get_p2(this: &DomQuadJson) -> Option; #[cfg(feature = "DomPoint")] + #[doc = "Change the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p2")] - fn p2_shim(this: &DomQuadJson, val: &DomPoint); + pub fn set_p2(this: &DomQuadJson, val: &DomPoint); #[cfg(feature = "DomPoint")] + #[doc = "Get the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[wasm_bindgen(method, getter = "p3")] + pub fn get_p3(this: &DomQuadJson) -> Option; + #[cfg(feature = "DomPoint")] + #[doc = "Change the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p3")] - fn p3_shim(this: &DomQuadJson, val: &DomPoint); + pub fn set_p3(this: &DomQuadJson, val: &DomPoint); #[cfg(feature = "DomPoint")] + #[doc = "Get the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[wasm_bindgen(method, getter = "p4")] + pub fn get_p4(this: &DomQuadJson) -> Option; + #[cfg(feature = "DomPoint")] + #[doc = "Change the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] #[wasm_bindgen(method, setter = "p4")] - fn p4_shim(this: &DomQuadJson, val: &DomPoint); + pub fn set_p4(this: &DomQuadJson, val: &DomPoint); } impl DomQuadJson { #[doc = "Construct a new `DomQuadJson`."] @@ -33,35 +69,27 @@ impl DomQuadJson { ret } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p1()` instead."] pub fn p1(&mut self, val: &DomPoint) -> &mut Self { - self.p1_shim(val); + self.set_p1(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p2()` instead."] pub fn p2(&mut self, val: &DomPoint) -> &mut Self { - self.p2_shim(val); + self.set_p2(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p3` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p3()` instead."] pub fn p3(&mut self, val: &DomPoint) -> &mut Self { - self.p3_shim(val); + self.set_p3(val); self } #[cfg(feature = "DomPoint")] - #[doc = "Change the `p4` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + #[deprecated = "Use `set_p4()` instead."] pub fn p4(&mut self, val: &DomPoint) -> &mut Self { - self.p4_shim(val); + self.set_p4(val); self } } diff --git a/crates/web-sys/src/features/gen_DomRectInit.rs b/crates/web-sys/src/features/gen_DomRectInit.rs index 2124c443bc8..d02056c5ce2 100644 --- a/crates/web-sys/src/features/gen_DomRectInit.rs +++ b/crates/web-sys/src/features/gen_DomRectInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub type DomRectInit; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &DomRectInit) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &DomRectInit, val: f64); + pub fn set_height(this: &DomRectInit, val: f64); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &DomRectInit) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &DomRectInit, val: f64); + pub fn set_width(this: &DomRectInit, val: f64); + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &DomRectInit) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DomRectInit, val: f64); + pub fn set_x(this: &DomRectInit, val: f64); + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &DomRectInit) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DomRectInit, val: f64); + pub fn set_y(this: &DomRectInit, val: f64); } impl DomRectInit { #[doc = "Construct a new `DomRectInit`."] @@ -28,32 +60,24 @@ impl DomRectInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: f64) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: f64) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: f64) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: f64) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } } diff --git a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs index 584b0f9acc1..79560ef04a7 100644 --- a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs +++ b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] pub type DomWindowResizeEventDetail; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &DomWindowResizeEventDetail) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &DomWindowResizeEventDetail, val: i32); + pub fn set_height(this: &DomWindowResizeEventDetail, val: i32); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &DomWindowResizeEventDetail) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &DomWindowResizeEventDetail, val: i32); + pub fn set_width(this: &DomWindowResizeEventDetail, val: i32); } impl DomWindowResizeEventDetail { #[doc = "Construct a new `DomWindowResizeEventDetail`."] @@ -24,18 +40,14 @@ impl DomWindowResizeEventDetail { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_DoubleRange.rs b/crates/web-sys/src/features/gen_DoubleRange.rs index 692ef41deff..86a427e7df0 100644 --- a/crates/web-sys/src/features/gen_DoubleRange.rs +++ b/crates/web-sys/src/features/gen_DoubleRange.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type DoubleRange; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "max")] + pub fn get_max(this: &DoubleRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &DoubleRange, val: f64); + pub fn set_max(this: &DoubleRange, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "min")] + pub fn get_min(this: &DoubleRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &DoubleRange, val: f64); + pub fn set_min(this: &DoubleRange, val: f64); } #[cfg(web_sys_unstable_apis)] impl DoubleRange { @@ -33,25 +65,15 @@ impl DoubleRange { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: f64) -> &mut Self { - self.max_shim(val); + self.set_max(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DoubleRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: f64) -> &mut Self { - self.min_shim(val); + self.set_min(val); self } } diff --git a/crates/web-sys/src/features/gen_DragEventInit.rs b/crates/web-sys/src/features/gen_DragEventInit.rs index 0b50bf3a4b9..0781bdf1322 100644 --- a/crates/web-sys/src/features/gen_DragEventInit.rs +++ b/crates/web-sys/src/features/gen_DragEventInit.rs @@ -10,65 +10,292 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub type DragEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &DragEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DragEventInit, val: bool); + pub fn set_bubbles(this: &DragEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &DragEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DragEventInit, val: bool); + pub fn set_cancelable(this: &DragEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &DragEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DragEventInit, val: bool); + pub fn set_composed(this: &DragEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &DragEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &DragEventInit, val: i32); + pub fn set_detail(this: &DragEventInit, val: i32); + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &DragEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &DragEventInit, val: Option<&Window>); + pub fn set_view(this: &DragEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &DragEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &DragEventInit, val: bool); + pub fn set_alt_key(this: &DragEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &DragEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &DragEventInit, val: bool); + pub fn set_ctrl_key(this: &DragEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &DragEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &DragEventInit, val: bool); + pub fn set_meta_key(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_fn(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_num_lock(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_os(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_symbol(this: &DragEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &DragEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &DragEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &DragEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &DragEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &DragEventInit, val: bool); + pub fn set_shift_key(this: &DragEventInit, val: bool); + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "button")] + pub fn get_button(this: &DragEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &DragEventInit, val: i16); + pub fn set_button(this: &DragEventInit, val: i16); + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "buttons")] + pub fn get_buttons(this: &DragEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &DragEventInit, val: u16); + pub fn set_buttons(this: &DragEventInit, val: u16); + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "clientX")] + pub fn get_client_x(this: &DragEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &DragEventInit, val: i32); + pub fn set_client_x(this: &DragEventInit, val: i32); + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "clientY")] + pub fn get_client_y(this: &DragEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &DragEventInit, val: i32); + pub fn set_client_y(this: &DragEventInit, val: i32); + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "movementX")] + pub fn get_movement_x(this: &DragEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &DragEventInit, val: i32); + pub fn set_movement_x(this: &DragEventInit, val: i32); + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "movementY")] + pub fn get_movement_y(this: &DragEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &DragEventInit, val: i32); + pub fn set_movement_y(this: &DragEventInit, val: i32); #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] + #[wasm_bindgen(method, getter = "relatedTarget")] + pub fn get_related_target(this: &DragEventInit) -> Option; + #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &DragEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &DragEventInit, val: Option<&EventTarget>); + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "screenX")] + pub fn get_screen_x(this: &DragEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &DragEventInit, val: i32); + pub fn set_screen_x(this: &DragEventInit, val: i32); + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[wasm_bindgen(method, getter = "screenY")] + pub fn get_screen_y(this: &DragEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &DragEventInit, val: i32); + pub fn set_screen_y(this: &DragEventInit, val: i32); + #[cfg(feature = "DataTransfer")] + #[doc = "Get the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] + #[wasm_bindgen(method, getter = "dataTransfer")] + pub fn get_data_transfer(this: &DragEventInit) -> Option; #[cfg(feature = "DataTransfer")] + #[doc = "Change the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] #[wasm_bindgen(method, setter = "dataTransfer")] - fn data_transfer_shim(this: &DragEventInit, val: Option<&DataTransfer>); + pub fn set_data_transfer(this: &DragEventInit, val: Option<&DataTransfer>); } impl DragEventInit { #[doc = "Construct a new `DragEventInit`."] @@ -79,203 +306,147 @@ impl DragEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `dataTransfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] + #[deprecated = "Use `set_data_transfer()` instead."] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.data_transfer_shim(val); + self.set_data_transfer(val); self } } diff --git a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs index 494ed0224eb..dfd8201207c 100644 --- a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs +++ b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs @@ -10,24 +10,92 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub type DynamicsCompressorOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &DynamicsCompressorOptions, val: u32); + pub fn set_channel_count(this: &DynamicsCompressorOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &DynamicsCompressorOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &DynamicsCompressorOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &DynamicsCompressorOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation( + this: &DynamicsCompressorOptions, + ) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &DynamicsCompressorOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &DynamicsCompressorOptions, val: ChannelInterpretation); + #[doc = "Get the `attack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "attack")] + pub fn get_attack(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `attack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "attack")] - fn attack_shim(this: &DynamicsCompressorOptions, val: f32); + pub fn set_attack(this: &DynamicsCompressorOptions, val: f32); + #[doc = "Get the `knee` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "knee")] + pub fn get_knee(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `knee` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "knee")] - fn knee_shim(this: &DynamicsCompressorOptions, val: f32); + pub fn set_knee(this: &DynamicsCompressorOptions, val: f32); + #[doc = "Get the `ratio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "ratio")] + pub fn get_ratio(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `ratio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "ratio")] - fn ratio_shim(this: &DynamicsCompressorOptions, val: f32); + pub fn set_ratio(this: &DynamicsCompressorOptions, val: f32); + #[doc = "Get the `release` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "release")] + pub fn get_release(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `release` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "release")] - fn release_shim(this: &DynamicsCompressorOptions, val: f32); + pub fn set_release(this: &DynamicsCompressorOptions, val: f32); + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[wasm_bindgen(method, getter = "threshold")] + pub fn get_threshold(this: &DynamicsCompressorOptions) -> Option; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &DynamicsCompressorOptions, val: f32); + pub fn set_threshold(this: &DynamicsCompressorOptions, val: f32); } impl DynamicsCompressorOptions { #[doc = "Construct a new `DynamicsCompressorOptions`."] @@ -38,62 +106,46 @@ impl DynamicsCompressorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `attack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_attack()` instead."] pub fn attack(&mut self, val: f32) -> &mut Self { - self.attack_shim(val); + self.set_attack(val); self } - #[doc = "Change the `knee` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_knee()` instead."] pub fn knee(&mut self, val: f32) -> &mut Self { - self.knee_shim(val); + self.set_knee(val); self } - #[doc = "Change the `ratio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_ratio()` instead."] pub fn ratio(&mut self, val: f32) -> &mut Self { - self.ratio_shim(val); + self.set_ratio(val); self } - #[doc = "Change the `release` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_release()` instead."] pub fn release(&mut self, val: f32) -> &mut Self { - self.release_shim(val); + self.set_release(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: f32) -> &mut Self { - self.threshold_shim(val); + self.set_threshold(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs index 82ca2870a12..e45951c04b1 100644 --- a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] pub type EcKeyAlgorithm; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &EcKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyAlgorithm, val: &str); + pub fn set_name(this: &EcKeyAlgorithm, val: &str); + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "namedCurve")] + pub fn get_named_curve(this: &EcKeyAlgorithm) -> String; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyAlgorithm, val: &str); + pub fn set_named_curve(this: &EcKeyAlgorithm, val: &str); } impl EcKeyAlgorithm { #[doc = "Construct a new `EcKeyAlgorithm`."] @@ -26,18 +42,14 @@ impl EcKeyAlgorithm { ret.named_curve(named_curve); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyGenParams.rs b/crates/web-sys/src/features/gen_EcKeyGenParams.rs index 08ffc99e257..8992f7851b3 100644 --- a/crates/web-sys/src/features/gen_EcKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyGenParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] pub type EcKeyGenParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &EcKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyGenParams, val: &str); + pub fn set_name(this: &EcKeyGenParams, val: &str); + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[wasm_bindgen(method, getter = "namedCurve")] + pub fn get_named_curve(this: &EcKeyGenParams) -> String; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyGenParams, val: &str); + pub fn set_named_curve(this: &EcKeyGenParams, val: &str); } impl EcKeyGenParams { #[doc = "Construct a new `EcKeyGenParams`."] @@ -26,18 +42,14 @@ impl EcKeyGenParams { ret.named_curve(named_curve); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyImportParams.rs b/crates/web-sys/src/features/gen_EcKeyImportParams.rs index 512dee8819d..ed789023459 100644 --- a/crates/web-sys/src/features/gen_EcKeyImportParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyImportParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] pub type EcKeyImportParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &EcKeyImportParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyImportParams, val: &str); + pub fn set_name(this: &EcKeyImportParams, val: &str); + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[wasm_bindgen(method, getter = "namedCurve")] + pub fn get_named_curve(this: &EcKeyImportParams) -> Option; + #[doc = "Change the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyImportParams, val: &str); + pub fn set_named_curve(this: &EcKeyImportParams, val: &str); } impl EcKeyImportParams { #[doc = "Construct a new `EcKeyImportParams`."] @@ -25,18 +41,14 @@ impl EcKeyImportParams { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `namedCurve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + #[deprecated = "Use `set_named_curve()` instead."] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve(val); self } } diff --git a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs index c01ec76a8e2..a061a19b0ec 100644 --- a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] pub type EcdhKeyDeriveParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &EcdhKeyDeriveParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcdhKeyDeriveParams, val: &str); + pub fn set_name(this: &EcdhKeyDeriveParams, val: &str); #[cfg(feature = "CryptoKey")] + #[doc = "Get the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] + #[wasm_bindgen(method, getter = "public")] + pub fn get_public(this: &EcdhKeyDeriveParams) -> CryptoKey; + #[cfg(feature = "CryptoKey")] + #[doc = "Change the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] #[wasm_bindgen(method, setter = "public")] - fn public_shim(this: &EcdhKeyDeriveParams, val: &CryptoKey); + pub fn set_public(this: &EcdhKeyDeriveParams, val: &CryptoKey); } impl EcdhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -28,19 +45,15 @@ impl EcdhKeyDeriveParams { ret.public(public); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "CryptoKey")] - #[doc = "Change the `public` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] + #[deprecated = "Use `set_public()` instead."] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { - self.public_shim(val); + self.set_public(val); self } } diff --git a/crates/web-sys/src/features/gen_EcdsaParams.rs b/crates/web-sys/src/features/gen_EcdsaParams.rs index bfc9fe093fc..14fe80e857b 100644 --- a/crates/web-sys/src/features/gen_EcdsaParams.rs +++ b/crates/web-sys/src/features/gen_EcdsaParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] pub type EcdsaParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &EcdsaParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcdsaParams, val: &str); + pub fn set_name(this: &EcdsaParams, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &EcdsaParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); } impl EcdsaParams { #[doc = "Construct a new `EcdsaParams`."] @@ -26,18 +42,14 @@ impl EcdsaParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } } diff --git a/crates/web-sys/src/features/gen_EffectTiming.rs b/crates/web-sys/src/features/gen_EffectTiming.rs index cd1b84ecfb7..7a43b7a75c0 100644 --- a/crates/web-sys/src/features/gen_EffectTiming.rs +++ b/crates/web-sys/src/features/gen_EffectTiming.rs @@ -10,24 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub type EffectTiming; + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &EffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &EffectTiming, val: f64); + pub fn set_delay(this: &EffectTiming, val: f64); #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &EffectTiming) -> Option; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &EffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &EffectTiming, val: PlaybackDirection); + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &EffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &EffectTiming, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &EffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &EffectTiming, val: &str); + pub fn set_easing(this: &EffectTiming, val: &str); + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "endDelay")] + pub fn get_end_delay(this: &EffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &EffectTiming, val: f64); + pub fn set_end_delay(this: &EffectTiming, val: f64); + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &EffectTiming) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &EffectTiming, val: FillMode); + pub fn set_fill(this: &EffectTiming, val: FillMode); + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "iterationStart")] + pub fn get_iteration_start(this: &EffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &EffectTiming, val: f64); + pub fn set_iteration_start(this: &EffectTiming, val: f64); + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &EffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &EffectTiming, val: f64); + pub fn set_iterations(this: &EffectTiming, val: f64); } impl EffectTiming { #[doc = "Construct a new `EffectTiming`."] @@ -38,62 +104,46 @@ impl EffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations(val); self } } diff --git a/crates/web-sys/src/features/gen_ElementCreationOptions.rs b/crates/web-sys/src/features/gen_ElementCreationOptions.rs index 59bd3c85d11..d9d29bca20d 100644 --- a/crates/web-sys/src/features/gen_ElementCreationOptions.rs +++ b/crates/web-sys/src/features/gen_ElementCreationOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] pub type ElementCreationOptions; + #[doc = "Get the `is` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[wasm_bindgen(method, getter = "is")] + pub fn get_is(this: &ElementCreationOptions) -> Option; + #[doc = "Change the `is` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, setter = "is")] - fn is_shim(this: &ElementCreationOptions, val: &str); + pub fn set_is(this: &ElementCreationOptions, val: &str); + #[doc = "Get the `pseudo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[wasm_bindgen(method, getter = "pseudo")] + pub fn get_pseudo(this: &ElementCreationOptions) -> Option; + #[doc = "Change the `pseudo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] #[wasm_bindgen(method, setter = "pseudo")] - fn pseudo_shim(this: &ElementCreationOptions, val: &str); + pub fn set_pseudo(this: &ElementCreationOptions, val: &str); } impl ElementCreationOptions { #[doc = "Construct a new `ElementCreationOptions`."] @@ -24,18 +40,14 @@ impl ElementCreationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `is` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[deprecated = "Use `set_is()` instead."] pub fn is(&mut self, val: &str) -> &mut Self { - self.is_shim(val); + self.set_is(val); self } - #[doc = "Change the `pseudo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + #[deprecated = "Use `set_pseudo()` instead."] pub fn pseudo(&mut self, val: &str) -> &mut Self { - self.pseudo_shim(val); + self.set_pseudo(val); self } } diff --git a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs index 0c551a1c06f..086ab7bc6d3 100644 --- a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs +++ b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] pub type ElementDefinitionOptions; + #[doc = "Get the `extends` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] + #[wasm_bindgen(method, getter = "extends")] + pub fn get_extends(this: &ElementDefinitionOptions) -> Option; + #[doc = "Change the `extends` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] #[wasm_bindgen(method, setter = "extends")] - fn extends_shim(this: &ElementDefinitionOptions, val: &str); + pub fn set_extends(this: &ElementDefinitionOptions, val: &str); } impl ElementDefinitionOptions { #[doc = "Construct a new `ElementDefinitionOptions`."] @@ -22,11 +30,9 @@ impl ElementDefinitionOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `extends` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] + #[deprecated = "Use `set_extends()` instead."] pub fn extends(&mut self, val: &str) -> &mut Self { - self.extends_shim(val); + self.set_extends(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs index 089dd9bb426..76b491edc45 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedAudioChunkInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &EncodedAudioChunkInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &EncodedAudioChunkInit, val: &::js_sys::Object); + pub fn set_data(this: &EncodedAudioChunkInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &EncodedAudioChunkInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EncodedAudioChunkInit, val: f64); + pub fn set_duration(this: &EncodedAudioChunkInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &EncodedAudioChunkInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &EncodedAudioChunkInit, val: f64); + pub fn set_timestamp(this: &EncodedAudioChunkInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedAudioChunkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &EncodedAudioChunkInit) -> EncodedAudioChunkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedAudioChunkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); + pub fn set_type(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkInit { @@ -42,48 +107,28 @@ impl EncodedAudioChunkInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedAudioChunkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: EncodedAudioChunkType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs index a5da12d42dd..b90551f9051 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedAudioChunkMetadata; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Get the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "decoderConfig")] + pub fn get_decoder_config(this: &EncodedAudioChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Change the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "decoderConfig")] - fn decoder_config_shim(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); + pub fn set_decoder_config(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkMetadata { @@ -33,14 +50,9 @@ impl EncodedAudioChunkMetadata { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AudioDecoderConfig")] - #[doc = "Change the `decoderConfig` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_decoder_config()` instead."] pub fn decoder_config(&mut self, val: &AudioDecoderConfig) -> &mut Self { - self.decoder_config_shim(val); + self.set_decoder_config(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs index 7d8da29fee1..1e523952822 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedVideoChunkInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &EncodedVideoChunkInit) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &EncodedVideoChunkInit, val: &::js_sys::Object); + pub fn set_data(this: &EncodedVideoChunkInit, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &EncodedVideoChunkInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EncodedVideoChunkInit, val: f64); + pub fn set_duration(this: &EncodedVideoChunkInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &EncodedVideoChunkInit) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &EncodedVideoChunkInit, val: f64); + pub fn set_timestamp(this: &EncodedVideoChunkInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedVideoChunkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &EncodedVideoChunkInit) -> EncodedVideoChunkType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedVideoChunkType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); + pub fn set_type(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkInit { @@ -42,48 +107,28 @@ impl EncodedVideoChunkInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "EncodedVideoChunkType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: EncodedVideoChunkType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs index 354fb8dc070..640832b426b 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs @@ -14,14 +14,64 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedVideoChunkMetadata; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alphaSideData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "alphaSideData")] + pub fn get_alpha_side_data(this: &EncodedVideoChunkMetadata) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `alphaSideData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alphaSideData")] - fn alpha_side_data_shim(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); + pub fn set_alpha_side_data(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Get the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "decoderConfig")] + pub fn get_decoder_config(this: &EncodedVideoChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Change the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "decoderConfig")] - fn decoder_config_shim(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); + pub fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "SvcOutputMetadata")] + #[doc = "Get the `svc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "svc")] + pub fn get_svc(this: &EncodedVideoChunkMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "SvcOutputMetadata")] + #[doc = "Change the `svc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "svc")] - fn svc_shim(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); + pub fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkMetadata { @@ -37,38 +87,23 @@ impl EncodedVideoChunkMetadata { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `alphaSideData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha_side_data()` instead."] pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.alpha_side_data_shim(val); + self.set_alpha_side_data(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] - #[doc = "Change the `decoderConfig` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_decoder_config()` instead."] pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self { - self.decoder_config_shim(val); + self.set_decoder_config(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "SvcOutputMetadata")] - #[doc = "Change the `svc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_svc()` instead."] pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self { - self.svc_shim(val); + self.set_svc(val); self } } diff --git a/crates/web-sys/src/features/gen_ErrorCallback.rs b/crates/web-sys/src/features/gen_ErrorCallback.rs index e14346d2eae..7ca32ff496f 100644 --- a/crates/web-sys/src/features/gen_ErrorCallback.rs +++ b/crates/web-sys/src/features/gen_ErrorCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] pub type ErrorCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &ErrorCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &ErrorCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &ErrorCallback, val: &::js_sys::Function); } impl ErrorCallback { #[doc = "Construct a new `ErrorCallback`."] @@ -22,11 +30,9 @@ impl ErrorCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_ErrorEventInit.rs b/crates/web-sys/src/features/gen_ErrorEventInit.rs index 42369ecc8a4..da240ac4c11 100644 --- a/crates/web-sys/src/features/gen_ErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ErrorEventInit.rs @@ -10,22 +10,86 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub type ErrorEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ErrorEventInit, val: bool); + pub fn set_bubbles(this: &ErrorEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ErrorEventInit, val: bool); + pub fn set_cancelable(this: &ErrorEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ErrorEventInit, val: bool); + pub fn set_composed(this: &ErrorEventInit, val: bool); + #[doc = "Get the `colno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "colno")] + pub fn get_colno(this: &ErrorEventInit) -> Option; + #[doc = "Change the `colno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "colno")] - fn colno_shim(this: &ErrorEventInit, val: u32); + pub fn set_colno(this: &ErrorEventInit, val: u32); + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &ErrorEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_error(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "filename")] + pub fn get_filename(this: &ErrorEventInit) -> Option; + #[doc = "Change the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ErrorEventInit, val: &str); + pub fn set_filename(this: &ErrorEventInit, val: &str); + #[doc = "Get the `lineno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "lineno")] + pub fn get_lineno(this: &ErrorEventInit) -> Option; + #[doc = "Change the `lineno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "lineno")] - fn lineno_shim(this: &ErrorEventInit, val: u32); + pub fn set_lineno(this: &ErrorEventInit, val: u32); + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[wasm_bindgen(method, getter = "message")] + pub fn get_message(this: &ErrorEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &ErrorEventInit, val: &str); + pub fn set_message(this: &ErrorEventInit, val: &str); } impl ErrorEventInit { #[doc = "Construct a new `ErrorEventInit`."] @@ -36,60 +100,44 @@ impl ErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `colno` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_colno()` instead."] pub fn colno(&mut self, val: u32) -> &mut Self { - self.colno_shim(val); + self.set_colno(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } - #[doc = "Change the `filename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_filename()` instead."] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename(val); self } - #[doc = "Change the `lineno` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_lineno()` instead."] pub fn lineno(&mut self, val: u32) -> &mut Self { - self.lineno_shim(val); + self.set_lineno(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message(val); self } } diff --git a/crates/web-sys/src/features/gen_EventInit.rs b/crates/web-sys/src/features/gen_EventInit.rs index de8e524324e..218f4c21e47 100644 --- a/crates/web-sys/src/features/gen_EventInit.rs +++ b/crates/web-sys/src/features/gen_EventInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] pub type EventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &EventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &EventInit, val: bool); + pub fn set_bubbles(this: &EventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &EventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &EventInit, val: bool); + pub fn set_cancelable(this: &EventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &EventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &EventInit, val: bool); + pub fn set_composed(this: &EventInit, val: bool); } impl EventInit { #[doc = "Construct a new `EventInit`."] @@ -26,25 +50,19 @@ impl EventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_EventListener.rs b/crates/web-sys/src/features/gen_EventListener.rs index 8a17381cb56..20b2ba07407 100644 --- a/crates/web-sys/src/features/gen_EventListener.rs +++ b/crates/web-sys/src/features/gen_EventListener.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] pub type EventListener; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &EventListener) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &EventListener, val: &::js_sys::Function); + pub fn set_handle_event(this: &EventListener, val: &::js_sys::Function); } impl EventListener { #[doc = "Construct a new `EventListener`."] @@ -22,11 +30,9 @@ impl EventListener { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_EventListenerOptions.rs b/crates/web-sys/src/features/gen_EventListenerOptions.rs index 05b771d7084..521069c5617 100644 --- a/crates/web-sys/src/features/gen_EventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_EventListenerOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] pub type EventListenerOptions; + #[doc = "Get the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] + #[wasm_bindgen(method, getter = "capture")] + pub fn get_capture(this: &EventListenerOptions) -> Option; + #[doc = "Change the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] #[wasm_bindgen(method, setter = "capture")] - fn capture_shim(this: &EventListenerOptions, val: bool); + pub fn set_capture(this: &EventListenerOptions, val: bool); } impl EventListenerOptions { #[doc = "Construct a new `EventListenerOptions`."] @@ -22,11 +30,9 @@ impl EventListenerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `capture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] + #[deprecated = "Use `set_capture()` instead."] pub fn capture(&mut self, val: bool) -> &mut Self { - self.capture_shim(val); + self.set_capture(val); self } } diff --git a/crates/web-sys/src/features/gen_EventModifierInit.rs b/crates/web-sys/src/features/gen_EventModifierInit.rs index 373609a21ec..1e19e648c12 100644 --- a/crates/web-sys/src/features/gen_EventModifierInit.rs +++ b/crates/web-sys/src/features/gen_EventModifierInit.rs @@ -10,43 +10,188 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub type EventModifierInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &EventModifierInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &EventModifierInit, val: bool); + pub fn set_bubbles(this: &EventModifierInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &EventModifierInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &EventModifierInit, val: bool); + pub fn set_cancelable(this: &EventModifierInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &EventModifierInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &EventModifierInit, val: bool); + pub fn set_composed(this: &EventModifierInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &EventModifierInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &EventModifierInit, val: i32); + pub fn set_detail(this: &EventModifierInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &EventModifierInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &EventModifierInit, val: Option<&Window>); + pub fn set_view(this: &EventModifierInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &EventModifierInit, val: bool); + pub fn set_alt_key(this: &EventModifierInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &EventModifierInit, val: bool); + pub fn set_ctrl_key(this: &EventModifierInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &EventModifierInit, val: bool); + pub fn set_meta_key(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_alt_graph(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_caps_lock(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_fn(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_fn_lock(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_num_lock(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_os(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_scroll_lock(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_symbol(this: &EventModifierInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &EventModifierInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &EventModifierInit, val: bool); + pub fn set_modifier_symbol_lock(this: &EventModifierInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &EventModifierInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &EventModifierInit, val: bool); + pub fn set_shift_key(this: &EventModifierInit, val: bool); } impl EventModifierInit { #[doc = "Construct a new `EventModifierInit`."] @@ -57,131 +202,95 @@ impl EventModifierInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } } diff --git a/crates/web-sys/src/features/gen_EventSourceInit.rs b/crates/web-sys/src/features/gen_EventSourceInit.rs index 61761803dee..24afbe7a88b 100644 --- a/crates/web-sys/src/features/gen_EventSourceInit.rs +++ b/crates/web-sys/src/features/gen_EventSourceInit.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] pub type EventSourceInit; + #[doc = "Get the `withCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] + #[wasm_bindgen(method, getter = "withCredentials")] + pub fn get_with_credentials(this: &EventSourceInit) -> Option; + #[doc = "Change the `withCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] #[wasm_bindgen(method, setter = "withCredentials")] - fn with_credentials_shim(this: &EventSourceInit, val: bool); + pub fn set_with_credentials(this: &EventSourceInit, val: bool); } impl EventSourceInit { #[doc = "Construct a new `EventSourceInit`."] @@ -22,11 +30,9 @@ impl EventSourceInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `withCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] + #[deprecated = "Use `set_with_credentials()` instead."] pub fn with_credentials(&mut self, val: bool) -> &mut Self { - self.with_credentials_shim(val); + self.set_with_credentials(val); self } } diff --git a/crates/web-sys/src/features/gen_ExtendableEventInit.rs b/crates/web-sys/src/features/gen_ExtendableEventInit.rs index 1dbc56a64f7..5d701d27c82 100644 --- a/crates/web-sys/src/features/gen_ExtendableEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableEventInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] pub type ExtendableEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ExtendableEventInit, val: bool); + pub fn set_bubbles(this: &ExtendableEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ExtendableEventInit, val: bool); + pub fn set_cancelable(this: &ExtendableEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ExtendableEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ExtendableEventInit, val: bool); + pub fn set_composed(this: &ExtendableEventInit, val: bool); } impl ExtendableEventInit { #[doc = "Construct a new `ExtendableEventInit`."] @@ -26,25 +50,19 @@ impl ExtendableEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs index 32c11651574..745d1f041f8 100644 --- a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs @@ -10,22 +10,86 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub type ExtendableMessageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ExtendableMessageEventInit, val: bool); + pub fn set_bubbles(this: &ExtendableMessageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ExtendableMessageEventInit, val: bool); + pub fn set_cancelable(this: &ExtendableMessageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ExtendableMessageEventInit, val: bool); + pub fn set_composed(this: &ExtendableMessageEventInit, val: bool); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &ExtendableMessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "lastEventId")] + pub fn get_last_event_id(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "lastEventId")] - fn last_event_id_shim(this: &ExtendableMessageEventInit, val: &str); + pub fn set_last_event_id(this: &ExtendableMessageEventInit, val: &str); + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &ExtendableMessageEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &ExtendableMessageEventInit, val: &str); + pub fn set_origin(this: &ExtendableMessageEventInit, val: &str); + #[doc = "Get the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "ports")] + pub fn get_ports(this: &ExtendableMessageEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "ports")] - fn ports_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_ports(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &ExtendableMessageEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); + pub fn set_source(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); } impl ExtendableMessageEventInit { #[doc = "Construct a new `ExtendableMessageEventInit`."] @@ -36,60 +100,44 @@ impl ExtendableMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } - #[doc = "Change the `lastEventId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_last_event_id()` instead."] pub fn last_event_id(&mut self, val: &str) -> &mut Self { - self.last_event_id_shim(val); + self.set_last_event_id(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `ports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_ports()` instead."] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ports_shim(val); + self.set_ports(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs index 2d3e8407ce1..f1209b12a9e 100644 --- a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs +++ b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] pub type FakePluginMimeEntry; + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &FakePluginMimeEntry) -> Option; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FakePluginMimeEntry, val: &str); + pub fn set_description(this: &FakePluginMimeEntry, val: &str); + #[doc = "Get the `extension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[wasm_bindgen(method, getter = "extension")] + pub fn get_extension(this: &FakePluginMimeEntry) -> Option; + #[doc = "Change the `extension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "extension")] - fn extension_shim(this: &FakePluginMimeEntry, val: &str); + pub fn set_extension(this: &FakePluginMimeEntry, val: &str); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &FakePluginMimeEntry) -> String; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &FakePluginMimeEntry, val: &str); + pub fn set_type(this: &FakePluginMimeEntry, val: &str); } impl FakePluginMimeEntry { #[doc = "Construct a new `FakePluginMimeEntry`."] @@ -27,25 +51,19 @@ impl FakePluginMimeEntry { ret.type_(type_); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description(val); self } - #[doc = "Change the `extension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_extension()` instead."] pub fn extension(&mut self, val: &str) -> &mut Self { - self.extension_shim(val); + self.set_extension(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_FakePluginTagInit.rs b/crates/web-sys/src/features/gen_FakePluginTagInit.rs index 83d998c2dde..43ab5067c1a 100644 --- a/crates/web-sys/src/features/gen_FakePluginTagInit.rs +++ b/crates/web-sys/src/features/gen_FakePluginTagInit.rs @@ -10,24 +10,96 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub type FakePluginTagInit; + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FakePluginTagInit, val: &str); + pub fn set_description(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `fileName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "fileName")] + pub fn get_file_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `fileName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "fileName")] - fn file_name_shim(this: &FakePluginTagInit, val: &str); + pub fn set_file_name(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `fullPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "fullPath")] + pub fn get_full_path(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `fullPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "fullPath")] - fn full_path_shim(this: &FakePluginTagInit, val: &str); + pub fn set_full_path(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `handlerURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "handlerURI")] + pub fn get_handler_uri(this: &FakePluginTagInit) -> String; + #[doc = "Change the `handlerURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "handlerURI")] - fn handler_uri_shim(this: &FakePluginTagInit, val: &str); + pub fn set_handler_uri(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `mimeEntries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "mimeEntries")] + pub fn get_mime_entries(this: &FakePluginTagInit) -> ::js_sys::Array; + #[doc = "Change the `mimeEntries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "mimeEntries")] - fn mime_entries_shim(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); + pub fn set_mime_entries(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &FakePluginTagInit, val: &str); + pub fn set_name(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `niceName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "niceName")] + pub fn get_nice_name(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `niceName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "niceName")] - fn nice_name_shim(this: &FakePluginTagInit, val: &str); + pub fn set_nice_name(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `sandboxScript` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "sandboxScript")] + pub fn get_sandbox_script(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `sandboxScript` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "sandboxScript")] - fn sandbox_script_shim(this: &FakePluginTagInit, val: &str); + pub fn set_sandbox_script(this: &FakePluginTagInit, val: &str); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &FakePluginTagInit) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &FakePluginTagInit, val: &str); + pub fn set_version(this: &FakePluginTagInit, val: &str); } impl FakePluginTagInit { #[doc = "Construct a new `FakePluginTagInit`."] @@ -40,67 +112,49 @@ impl FakePluginTagInit { ret.mime_entries(mime_entries); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description(val); self } - #[doc = "Change the `fileName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_file_name()` instead."] pub fn file_name(&mut self, val: &str) -> &mut Self { - self.file_name_shim(val); + self.set_file_name(val); self } - #[doc = "Change the `fullPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_full_path()` instead."] pub fn full_path(&mut self, val: &str) -> &mut Self { - self.full_path_shim(val); + self.set_full_path(val); self } - #[doc = "Change the `handlerURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_handler_uri()` instead."] pub fn handler_uri(&mut self, val: &str) -> &mut Self { - self.handler_uri_shim(val); + self.set_handler_uri(val); self } - #[doc = "Change the `mimeEntries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_mime_entries()` instead."] pub fn mime_entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.mime_entries_shim(val); + self.set_mime_entries(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `niceName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_nice_name()` instead."] pub fn nice_name(&mut self, val: &str) -> &mut Self { - self.nice_name_shim(val); + self.set_nice_name(val); self } - #[doc = "Change the `sandboxScript` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_sandbox_script()` instead."] pub fn sandbox_script(&mut self, val: &str) -> &mut Self { - self.sandbox_script_shim(val); + self.set_sandbox_script(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_FetchEventInit.rs b/crates/web-sys/src/features/gen_FetchEventInit.rs index 4259035f3d0..0041cb59450 100644 --- a/crates/web-sys/src/features/gen_FetchEventInit.rs +++ b/crates/web-sys/src/features/gen_FetchEventInit.rs @@ -10,19 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub type FetchEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &FetchEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FetchEventInit, val: bool); + pub fn set_bubbles(this: &FetchEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &FetchEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FetchEventInit, val: bool); + pub fn set_cancelable(this: &FetchEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &FetchEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FetchEventInit, val: bool); + pub fn set_composed(this: &FetchEventInit, val: bool); + #[doc = "Get the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[wasm_bindgen(method, getter = "clientId")] + pub fn get_client_id(this: &FetchEventInit) -> Option; + #[doc = "Change the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "clientId")] - fn client_id_shim(this: &FetchEventInit, val: Option<&str>); + pub fn set_client_id(this: &FetchEventInit, val: Option<&str>); + #[doc = "Get the `isReload` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[wasm_bindgen(method, getter = "isReload")] + pub fn get_is_reload(this: &FetchEventInit) -> Option; + #[doc = "Change the `isReload` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] #[wasm_bindgen(method, setter = "isReload")] - fn is_reload_shim(this: &FetchEventInit, val: bool); + pub fn set_is_reload(this: &FetchEventInit, val: bool); #[cfg(feature = "Request")] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] + #[wasm_bindgen(method, getter = "request")] + pub fn get_request(this: &FetchEventInit) -> Request; + #[cfg(feature = "Request")] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &FetchEventInit, val: &Request); + pub fn set_request(this: &FetchEventInit, val: &Request); } impl FetchEventInit { #[cfg(feature = "Request")] @@ -35,47 +84,35 @@ impl FetchEventInit { ret.request(request); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `clientId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_client_id()` instead."] pub fn client_id(&mut self, val: Option<&str>) -> &mut Self { - self.client_id_shim(val); + self.set_client_id(val); self } - #[doc = "Change the `isReload` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + #[deprecated = "Use `set_is_reload()` instead."] pub fn is_reload(&mut self, val: bool) -> &mut Self { - self.is_reload_shim(val); + self.set_is_reload(val); self } #[cfg(feature = "Request")] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: &Request) -> &mut Self { - self.request_shim(val); + self.set_request(val); self } } diff --git a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs index 3205e8c2b0b..04e2c6e4040 100644 --- a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs +++ b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] pub type FetchReadableStreamReadDataDone; + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] + #[wasm_bindgen(method, getter = "done")] + pub fn get_done(this: &FetchReadableStreamReadDataDone) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &FetchReadableStreamReadDataDone, val: bool); + pub fn set_done(this: &FetchReadableStreamReadDataDone, val: bool); } impl FetchReadableStreamReadDataDone { #[doc = "Construct a new `FetchReadableStreamReadDataDone`."] @@ -22,11 +30,9 @@ impl FetchReadableStreamReadDataDone { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done(val); self } } diff --git a/crates/web-sys/src/features/gen_FileCallback.rs b/crates/web-sys/src/features/gen_FileCallback.rs index 17beb74983c..3aa94c60949 100644 --- a/crates/web-sys/src/features/gen_FileCallback.rs +++ b/crates/web-sys/src/features/gen_FileCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] pub type FileCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &FileCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileCallback, val: &::js_sys::Function); } impl FileCallback { #[doc = "Construct a new `FileCallback`."] @@ -22,11 +30,9 @@ impl FileCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs index 196fd6f0a79..f969507a01c 100644 --- a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs +++ b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FilePickerAcceptType; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &FilePickerAcceptType) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FilePickerAcceptType, val: &str); + pub fn set_description(this: &FilePickerAcceptType, val: &str); } #[cfg(web_sys_unstable_apis)] impl FilePickerAcceptType { @@ -31,14 +47,9 @@ impl FilePickerAcceptType { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePickerOptions.rs b/crates/web-sys/src/features/gen_FilePickerOptions.rs index 639ead2b1ea..deb857f4ce4 100644 --- a/crates/web-sys/src/features/gen_FilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_FilePickerOptions.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FilePickerOptions; - #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &FilePickerOptions, val: bool); - #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &FilePickerOptions, val: &str); - #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl FilePickerOptions { - #[doc = "Construct a new `FilePickerOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + pub fn get_exclude_accept_all_option(this: &FilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `excludeAcceptAllOption` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl FilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); - self - } + #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] + pub fn set_exclude_accept_all_option(this: &FilePickerOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &FilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `id` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl FilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); - self - } + #[wasm_bindgen(method, setter = "id")] + pub fn set_id(this: &FilePickerOptions, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "startIn")] + pub fn get_start_in(this: &FilePickerOptions) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `startIn` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl FilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); - self - } + #[wasm_bindgen(method, setter = "startIn")] + pub fn set_start_in(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "types")] + pub fn get_types(this: &FilePickerOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `types` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl FilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "types")] + pub fn set_types(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl FilePickerOptions { + #[doc = "Construct a new `FilePickerOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] + pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { + self.set_exclude_accept_all_option(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_id()` instead."] + pub fn id(&mut self, val: &str) -> &mut Self { + self.set_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_start_in()` instead."] + pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_start_in(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePropertyBag.rs b/crates/web-sys/src/features/gen_FilePropertyBag.rs index 99ecc5bb920..0b5c3ad8751 100644 --- a/crates/web-sys/src/features/gen_FilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_FilePropertyBag.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] pub type FilePropertyBag; + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[wasm_bindgen(method, getter = "lastModified")] + pub fn get_last_modified(this: &FilePropertyBag) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &FilePropertyBag, val: f64); + pub fn set_last_modified(this: &FilePropertyBag, val: f64); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &FilePropertyBag) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &FilePropertyBag, val: &str); + pub fn set_type(this: &FilePropertyBag, val: &str); } impl FilePropertyBag { #[doc = "Construct a new `FilePropertyBag`."] @@ -24,18 +40,14 @@ impl FilePropertyBag { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: f64) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs index ae33bfeb6de..3d03f2adf65 100644 --- a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] pub type FileSystemCreateWritableOptions; + #[doc = "Get the `keepExistingData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] + #[wasm_bindgen(method, getter = "keepExistingData")] + pub fn get_keep_existing_data(this: &FileSystemCreateWritableOptions) -> Option; + #[doc = "Change the `keepExistingData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] #[wasm_bindgen(method, setter = "keepExistingData")] - fn keep_existing_data_shim(this: &FileSystemCreateWritableOptions, val: bool); + pub fn set_keep_existing_data(this: &FileSystemCreateWritableOptions, val: bool); } impl FileSystemCreateWritableOptions { #[doc = "Construct a new `FileSystemCreateWritableOptions`."] @@ -22,11 +30,9 @@ impl FileSystemCreateWritableOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `keepExistingData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] + #[deprecated = "Use `set_keep_existing_data()` instead."] pub fn keep_existing_data(&mut self, val: bool) -> &mut Self { - self.keep_existing_data_shim(val); + self.set_keep_existing_data(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs index 6cb0cfb560d..581452a8fda 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] pub type FileSystemEntriesCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &FileSystemEntriesCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileSystemEntriesCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileSystemEntriesCallback, val: &::js_sys::Function); } impl FileSystemEntriesCallback { #[doc = "Construct a new `FileSystemEntriesCallback`."] @@ -22,11 +30,9 @@ impl FileSystemEntriesCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs index 4a5988ec2b8..ef3d86cf1b6 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] pub type FileSystemEntryCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &FileSystemEntryCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileSystemEntryCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &FileSystemEntryCallback, val: &::js_sys::Function); } impl FileSystemEntryCallback { #[doc = "Construct a new `FileSystemEntryCallback`."] @@ -22,11 +30,9 @@ impl FileSystemEntryCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemFlags.rs b/crates/web-sys/src/features/gen_FileSystemFlags.rs index bb68735f21e..62be51dd863 100644 --- a/crates/web-sys/src/features/gen_FileSystemFlags.rs +++ b/crates/web-sys/src/features/gen_FileSystemFlags.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] pub type FileSystemFlags; + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[wasm_bindgen(method, getter = "create")] + pub fn get_create(this: &FileSystemFlags) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemFlags, val: bool); + pub fn set_create(this: &FileSystemFlags, val: bool); + #[doc = "Get the `exclusive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[wasm_bindgen(method, getter = "exclusive")] + pub fn get_exclusive(this: &FileSystemFlags) -> Option; + #[doc = "Change the `exclusive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] #[wasm_bindgen(method, setter = "exclusive")] - fn exclusive_shim(this: &FileSystemFlags, val: bool); + pub fn set_exclusive(this: &FileSystemFlags, val: bool); } impl FileSystemFlags { #[doc = "Construct a new `FileSystemFlags`."] @@ -24,18 +40,14 @@ impl FileSystemFlags { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create(val); self } - #[doc = "Change the `exclusive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + #[deprecated = "Use `set_exclusive()` instead."] pub fn exclusive(&mut self, val: bool) -> &mut Self { - self.exclusive_shim(val); + self.set_exclusive(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs index b25b6429426..1d5c1d52131 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] pub type FileSystemGetDirectoryOptions; + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] + #[wasm_bindgen(method, getter = "create")] + pub fn get_create(this: &FileSystemGetDirectoryOptions) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemGetDirectoryOptions, val: bool); + pub fn set_create(this: &FileSystemGetDirectoryOptions, val: bool); } impl FileSystemGetDirectoryOptions { #[doc = "Construct a new `FileSystemGetDirectoryOptions`."] @@ -22,11 +30,9 @@ impl FileSystemGetDirectoryOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs index 78004c0a807..2aebf3b23ea 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] pub type FileSystemGetFileOptions; + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] + #[wasm_bindgen(method, getter = "create")] + pub fn get_create(this: &FileSystemGetFileOptions) -> Option; + #[doc = "Change the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemGetFileOptions, val: bool); + pub fn set_create(this: &FileSystemGetFileOptions, val: bool); } impl FileSystemGetFileOptions { #[doc = "Construct a new `FileSystemGetFileOptions`."] @@ -22,11 +30,9 @@ impl FileSystemGetFileOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `create` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] + #[deprecated = "Use `set_create()` instead."] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs index 042392fed2a..8f8aaa1c0ed 100644 --- a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs @@ -14,9 +14,28 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FileSystemHandlePermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode( + this: &FileSystemHandlePermissionDescriptor, + ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); + pub fn set_mode(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); } #[cfg(web_sys_unstable_apis)] impl FileSystemHandlePermissionDescriptor { @@ -33,14 +52,9 @@ impl FileSystemHandlePermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs index b777cfe64f3..4a8c7df1f12 100644 --- a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs @@ -14,15 +14,66 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FileSystemPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &FileSystemPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &FileSystemPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &FileSystemPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandle")] + #[doc = "Get the `handle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "handle")] + pub fn get_handle(this: &FileSystemPermissionDescriptor) -> FileSystemHandle; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemHandle")] + #[doc = "Change the `handle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "handle")] - fn handle_shim(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); + pub fn set_handle(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &FileSystemPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); + pub fn set_mode(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); } #[cfg(web_sys_unstable_apis)] impl FileSystemPermissionDescriptor { @@ -42,38 +93,23 @@ impl FileSystemPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandle")] - #[doc = "Change the `handle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_handle()` instead."] pub fn handle(&mut self, val: &FileSystemHandle) -> &mut Self { - self.handle_shim(val); + self.set_handle(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemPermissionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs index c54fb3a3284..2cdd030a0ee 100644 --- a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] pub type FileSystemReadWriteOptions; + #[doc = "Get the `at` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] + #[wasm_bindgen(method, getter = "at")] + pub fn get_at(this: &FileSystemReadWriteOptions) -> Option; + #[doc = "Change the `at` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] #[wasm_bindgen(method, setter = "at")] - fn at_shim(this: &FileSystemReadWriteOptions, val: f64); + pub fn set_at(this: &FileSystemReadWriteOptions, val: f64); } impl FileSystemReadWriteOptions { #[doc = "Construct a new `FileSystemReadWriteOptions`."] @@ -22,11 +30,9 @@ impl FileSystemReadWriteOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `at` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] + #[deprecated = "Use `set_at()` instead."] pub fn at(&mut self, val: f64) -> &mut Self { - self.at_shim(val); + self.set_at(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs index fbc6e6fdbc7..e1ec6700ef1 100644 --- a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] pub type FileSystemRemoveOptions; + #[doc = "Get the `recursive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] + #[wasm_bindgen(method, getter = "recursive")] + pub fn get_recursive(this: &FileSystemRemoveOptions) -> Option; + #[doc = "Change the `recursive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] #[wasm_bindgen(method, setter = "recursive")] - fn recursive_shim(this: &FileSystemRemoveOptions, val: bool); + pub fn set_recursive(this: &FileSystemRemoveOptions, val: bool); } impl FileSystemRemoveOptions { #[doc = "Construct a new `FileSystemRemoveOptions`."] @@ -22,11 +30,9 @@ impl FileSystemRemoveOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `recursive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] + #[deprecated = "Use `set_recursive()` instead."] pub fn recursive(&mut self, val: bool) -> &mut Self { - self.recursive_shim(val); + self.set_recursive(val); self } } diff --git a/crates/web-sys/src/features/gen_FocusEventInit.rs b/crates/web-sys/src/features/gen_FocusEventInit.rs index 80ec658083c..a7a84b2eb99 100644 --- a/crates/web-sys/src/features/gen_FocusEventInit.rs +++ b/crates/web-sys/src/features/gen_FocusEventInit.rs @@ -10,20 +10,70 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub type FocusEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &FocusEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FocusEventInit, val: bool); + pub fn set_bubbles(this: &FocusEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &FocusEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FocusEventInit, val: bool); + pub fn set_cancelable(this: &FocusEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &FocusEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FocusEventInit, val: bool); + pub fn set_composed(this: &FocusEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &FocusEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &FocusEventInit, val: i32); + pub fn set_detail(this: &FocusEventInit, val: i32); + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &FocusEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &FocusEventInit, val: Option<&Window>); + pub fn set_view(this: &FocusEventInit, val: Option<&Window>); + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] + #[wasm_bindgen(method, getter = "relatedTarget")] + pub fn get_related_target(this: &FocusEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &FocusEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &FocusEventInit, val: Option<&EventTarget>); } impl FocusEventInit { #[doc = "Construct a new `FocusEventInit`."] @@ -34,48 +84,36 @@ impl FocusEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target(val); self } } diff --git a/crates/web-sys/src/features/gen_FocusOptions.rs b/crates/web-sys/src/features/gen_FocusOptions.rs index 0efdeef5c81..d1ae31c1dab 100644 --- a/crates/web-sys/src/features/gen_FocusOptions.rs +++ b/crates/web-sys/src/features/gen_FocusOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] pub type FocusOptions; + #[doc = "Get the `focusVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] + #[wasm_bindgen(method, getter = "focusVisible")] + pub fn get_focus_visible(this: &FocusOptions) -> Option; + #[doc = "Change the `focusVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] #[wasm_bindgen(method, setter = "focusVisible")] - fn focus_visible_shim(this: &FocusOptions, val: bool); + pub fn set_focus_visible(this: &FocusOptions, val: bool); + #[doc = "Get the `preventScroll` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] + #[wasm_bindgen(method, getter = "preventScroll")] + pub fn get_prevent_scroll(this: &FocusOptions) -> Option; + #[doc = "Change the `preventScroll` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] #[wasm_bindgen(method, setter = "preventScroll")] - fn prevent_scroll_shim(this: &FocusOptions, val: bool); + pub fn set_prevent_scroll(this: &FocusOptions, val: bool); } impl FocusOptions { #[doc = "Construct a new `FocusOptions`."] @@ -24,18 +40,14 @@ impl FocusOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `focusVisible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] + #[deprecated = "Use `set_focus_visible()` instead."] pub fn focus_visible(&mut self, val: bool) -> &mut Self { - self.focus_visible_shim(val); + self.set_focus_visible(val); self } - #[doc = "Change the `preventScroll` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FocusOptions`*"] + #[deprecated = "Use `set_prevent_scroll()` instead."] pub fn prevent_scroll(&mut self, val: bool) -> &mut Self { - self.prevent_scroll_shim(val); + self.set_prevent_scroll(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs index 1da0a315c1f..3598c4f11dd 100644 --- a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs +++ b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs @@ -10,22 +10,86 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub type FontFaceDescriptors; + #[doc = "Get the `display` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "display")] + pub fn get_display(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `display` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "display")] - fn display_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_display(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `featureSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "featureSettings")] + pub fn get_feature_settings(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `featureSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "featureSettings")] - fn feature_settings_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_feature_settings(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `stretch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "stretch")] + pub fn get_stretch(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `stretch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "stretch")] - fn stretch_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_stretch(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "style")] + pub fn get_style(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_style(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `unicodeRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "unicodeRange")] + pub fn get_unicode_range(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `unicodeRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "unicodeRange")] - fn unicode_range_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_unicode_range(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `variant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "variant")] + pub fn get_variant(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `variant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "variant")] - fn variant_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_variant(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `variationSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "variationSettings")] + pub fn get_variation_settings(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `variationSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "variationSettings")] - fn variation_settings_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_variation_settings(this: &FontFaceDescriptors, val: &str); + #[doc = "Get the `weight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[wasm_bindgen(method, getter = "weight")] + pub fn get_weight(this: &FontFaceDescriptors) -> Option; + #[doc = "Change the `weight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] #[wasm_bindgen(method, setter = "weight")] - fn weight_shim(this: &FontFaceDescriptors, val: &str); + pub fn set_weight(this: &FontFaceDescriptors, val: &str); } impl FontFaceDescriptors { #[doc = "Construct a new `FontFaceDescriptors`."] @@ -36,60 +100,44 @@ impl FontFaceDescriptors { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `display` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_display()` instead."] pub fn display(&mut self, val: &str) -> &mut Self { - self.display_shim(val); + self.set_display(val); self } - #[doc = "Change the `featureSettings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_feature_settings()` instead."] pub fn feature_settings(&mut self, val: &str) -> &mut Self { - self.feature_settings_shim(val); + self.set_feature_settings(val); self } - #[doc = "Change the `stretch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_stretch()` instead."] pub fn stretch(&mut self, val: &str) -> &mut Self { - self.stretch_shim(val); + self.set_stretch(val); self } - #[doc = "Change the `style` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_style()` instead."] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style(val); self } - #[doc = "Change the `unicodeRange` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_unicode_range()` instead."] pub fn unicode_range(&mut self, val: &str) -> &mut Self { - self.unicode_range_shim(val); + self.set_unicode_range(val); self } - #[doc = "Change the `variant` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_variant()` instead."] pub fn variant(&mut self, val: &str) -> &mut Self { - self.variant_shim(val); + self.set_variant(val); self } - #[doc = "Change the `variationSettings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_variation_settings()` instead."] pub fn variation_settings(&mut self, val: &str) -> &mut Self { - self.variation_settings_shim(val); + self.set_variation_settings(val); self } - #[doc = "Change the `weight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + #[deprecated = "Use `set_weight()` instead."] pub fn weight(&mut self, val: &str) -> &mut Self { - self.weight_shim(val); + self.set_weight(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs index 2cab9cdfe02..469670809fb 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] pub type FontFaceSetIteratorResult; + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[wasm_bindgen(method, getter = "done")] + pub fn get_done(this: &FontFaceSetIteratorResult) -> bool; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &FontFaceSetIteratorResult, val: bool); + pub fn set_done(this: &FontFaceSetIteratorResult, val: bool); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &FontFaceSetIteratorResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); } impl FontFaceSetIteratorResult { #[doc = "Construct a new `FontFaceSetIteratorResult`."] @@ -26,18 +42,14 @@ impl FontFaceSetIteratorResult { ret.value(value); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs index 994c5e291e8..147a3316581 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub type FontFaceSetLoadEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_bubbles(this: &FontFaceSetLoadEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_cancelable(this: &FontFaceSetLoadEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &FontFaceSetLoadEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FontFaceSetLoadEventInit, val: bool); + pub fn set_composed(this: &FontFaceSetLoadEventInit, val: bool); + #[doc = "Get the `fontfaces` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[wasm_bindgen(method, getter = "fontfaces")] + pub fn get_fontfaces(this: &FontFaceSetLoadEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `fontfaces` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] #[wasm_bindgen(method, setter = "fontfaces")] - fn fontfaces_shim(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_fontfaces(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); } impl FontFaceSetLoadEventInit { #[doc = "Construct a new `FontFaceSetLoadEventInit`."] @@ -28,32 +60,24 @@ impl FontFaceSetLoadEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `fontfaces` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + #[deprecated = "Use `set_fontfaces()` instead."] pub fn fontfaces(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.fontfaces_shim(val); + self.set_fontfaces(val); self } } diff --git a/crates/web-sys/src/features/gen_GainOptions.rs b/crates/web-sys/src/features/gen_GainOptions.rs index a6f06048e20..11dbccc476b 100644 --- a/crates/web-sys/src/features/gen_GainOptions.rs +++ b/crates/web-sys/src/features/gen_GainOptions.rs @@ -10,16 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] pub type GainOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &GainOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &GainOptions, val: u32); + pub fn set_channel_count(this: &GainOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &GainOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &GainOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &GainOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &GainOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &GainOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &GainOptions, val: ChannelInterpretation); + #[doc = "Get the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[wasm_bindgen(method, getter = "gain")] + pub fn get_gain(this: &GainOptions) -> Option; + #[doc = "Change the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] #[wasm_bindgen(method, setter = "gain")] - fn gain_shim(this: &GainOptions, val: f32); + pub fn set_gain(this: &GainOptions, val: f32); } impl GainOptions { #[doc = "Construct a new `GainOptions`."] @@ -30,34 +64,26 @@ impl GainOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `gain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + #[deprecated = "Use `set_gain()` instead."] pub fn gain(&mut self, val: f32) -> &mut Self { - self.gain_shim(val); + self.set_gain(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs index 039b25d0ea0..885cee25eca 100644 --- a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs @@ -10,19 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub type GamepadAxisMoveEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_bubbles(this: &GamepadAxisMoveEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_cancelable(this: &GamepadAxisMoveEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadAxisMoveEventInit, val: bool); + pub fn set_composed(this: &GamepadAxisMoveEventInit, val: bool); + #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "gamepad")] + pub fn get_gamepad(this: &GamepadAxisMoveEventInit) -> Option; #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); + #[doc = "Get the `axis` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "axis")] + pub fn get_axis(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `axis` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "axis")] - fn axis_shim(this: &GamepadAxisMoveEventInit, val: u32); + pub fn set_axis(this: &GamepadAxisMoveEventInit, val: u32); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &GamepadAxisMoveEventInit) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &GamepadAxisMoveEventInit, val: f64); + pub fn set_value(this: &GamepadAxisMoveEventInit, val: f64); } impl GamepadAxisMoveEventInit { #[doc = "Construct a new `GamepadAxisMoveEventInit`."] @@ -33,47 +82,35 @@ impl GamepadAxisMoveEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad(val); self } - #[doc = "Change the `axis` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_axis()` instead."] pub fn axis(&mut self, val: u32) -> &mut Self { - self.axis_shim(val); + self.set_axis(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs index dfe076a66ba..9cd13854ed9 100644 --- a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub type GamepadButtonEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadButtonEventInit, val: bool); + pub fn set_bubbles(this: &GamepadButtonEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadButtonEventInit, val: bool); + pub fn set_cancelable(this: &GamepadButtonEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadButtonEventInit, val: bool); + pub fn set_composed(this: &GamepadButtonEventInit, val: bool); + #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] + #[wasm_bindgen(method, getter = "gamepad")] + pub fn get_gamepad(this: &GamepadButtonEventInit) -> Option; #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadButtonEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadButtonEventInit, val: Option<&Gamepad>); + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[wasm_bindgen(method, getter = "button")] + pub fn get_button(this: &GamepadButtonEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &GamepadButtonEventInit, val: u32); + pub fn set_button(this: &GamepadButtonEventInit, val: u32); } impl GamepadButtonEventInit { #[doc = "Construct a new `GamepadButtonEventInit`."] @@ -31,40 +72,30 @@ impl GamepadButtonEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: u32) -> &mut Self { - self.button_shim(val); + self.set_button(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadEventInit.rs b/crates/web-sys/src/features/gen_GamepadEventInit.rs index 13ee954f335..de166b1d735 100644 --- a/crates/web-sys/src/features/gen_GamepadEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] pub type GamepadEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &GamepadEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadEventInit, val: bool); + pub fn set_bubbles(this: &GamepadEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &GamepadEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadEventInit, val: bool); + pub fn set_cancelable(this: &GamepadEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GamepadEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadEventInit, val: bool); + pub fn set_composed(this: &GamepadEventInit, val: bool); #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] + #[wasm_bindgen(method, getter = "gamepad")] + pub fn get_gamepad(this: &GamepadEventInit) -> Option; + #[cfg(feature = "Gamepad")] + #[doc = "Change the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadEventInit, val: Option<&Gamepad>); + pub fn set_gamepad(this: &GamepadEventInit, val: Option<&Gamepad>); } impl GamepadEventInit { #[doc = "Construct a new `GamepadEventInit`."] @@ -29,33 +62,25 @@ impl GamepadEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Gamepad")] - #[doc = "Change the `gamepad` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] + #[deprecated = "Use `set_gamepad()` instead."] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad(val); self } } diff --git a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs index 7f2774c308b..3781d6ebc90 100644 --- a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs +++ b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GetAnimationsOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "subtree")] + pub fn get_subtree(this: &GetAnimationsOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &GetAnimationsOptions, val: bool); + pub fn set_subtree(this: &GetAnimationsOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl GetAnimationsOptions { @@ -31,14 +47,9 @@ impl GetAnimationsOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree(val); self } } diff --git a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs index ba387240e5d..616cfaa611e 100644 --- a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs +++ b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] pub type GetRootNodeOptions; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GetRootNodeOptions) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GetRootNodeOptions, val: bool); + pub fn set_composed(this: &GetRootNodeOptions, val: bool); } impl GetRootNodeOptions { #[doc = "Construct a new `GetRootNodeOptions`."] @@ -22,11 +30,9 @@ impl GetRootNodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs index c5594b85ad3..9f1ad18daf3 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuBindGroupDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBindGroupDescriptor, val: &str); + pub fn set_label(this: &GpuBindGroupDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entries")] + pub fn get_entries(this: &GpuBindGroupDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBindGroupLayout")] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuBindGroupDescriptor) -> GpuBindGroupLayout; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBindGroupLayout")] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); + pub fn set_layout(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupDescriptor { @@ -39,37 +88,22 @@ impl GpuBindGroupDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBindGroupLayout")] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &GpuBindGroupLayout) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs index e41ab563eba..dff39885718 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupEntry; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "binding")] + pub fn get_binding(this: &GpuBindGroupEntry) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "binding")] - fn binding_shim(this: &GpuBindGroupEntry, val: u32); + pub fn set_binding(this: &GpuBindGroupEntry, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "resource")] + pub fn get_resource(this: &GpuBindGroupEntry) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "resource")] - fn resource_shim(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); + pub fn set_resource(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupEntry { @@ -35,25 +67,15 @@ impl GpuBindGroupEntry { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `binding` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_binding()` instead."] pub fn binding(&mut self, val: u32) -> &mut Self { - self.binding_shim(val); + self.set_binding(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `resource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_resource()` instead."] pub fn resource(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.resource_shim(val); + self.set_resource(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs index 2ca1218a16e..b7747d5d756 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupLayoutDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuBindGroupLayoutDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBindGroupLayoutDescriptor, val: &str); + pub fn set_label(this: &GpuBindGroupLayoutDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entries")] + pub fn get_entries(this: &GpuBindGroupLayoutDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupLayoutDescriptor { @@ -34,25 +66,15 @@ impl GpuBindGroupLayoutDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entries()` instead."] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs index 87e1e46d5c9..6472b43a32e 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs @@ -14,41 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupLayoutEntry; - #[wasm_bindgen(method, setter = "binding")] - fn binding_shim(this: &GpuBindGroupLayoutEntry, val: u32); - #[cfg(feature = "GpuBufferBindingLayout")] - #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); - #[cfg(feature = "GpuExternalTextureBindingLayout")] - #[wasm_bindgen(method, setter = "externalTexture")] - fn external_texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuExternalTextureBindingLayout); - #[cfg(feature = "GpuSamplerBindingLayout")] - #[wasm_bindgen(method, setter = "sampler")] - fn sampler_shim(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); - #[cfg(feature = "GpuStorageTextureBindingLayout")] - #[wasm_bindgen(method, setter = "storageTexture")] - fn storage_texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuStorageTextureBindingLayout); - #[cfg(feature = "GpuTextureBindingLayout")] - #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); - #[wasm_bindgen(method, setter = "visibility")] - fn visibility_shim(this: &GpuBindGroupLayoutEntry, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuBindGroupLayoutEntry { - #[doc = "Construct a new `GpuBindGroupLayoutEntry`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `binding` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(binding: u32, visibility: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.binding(binding); - ret.visibility(visibility); - ret - } + #[wasm_bindgen(method, getter = "binding")] + pub fn get_binding(this: &GpuBindGroupLayoutEntry) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `binding` field of this object."] #[doc = ""] @@ -56,10 +30,18 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn binding(&mut self, val: u32) -> &mut Self { - self.binding_shim(val); - self - } + #[wasm_bindgen(method, setter = "binding")] + pub fn set_binding(this: &GpuBindGroupLayoutEntry, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingLayout")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "buffer")] + pub fn get_buffer(this: &GpuBindGroupLayoutEntry) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingLayout")] #[doc = "Change the `buffer` field of this object."] @@ -68,10 +50,20 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn buffer(&mut self, val: &GpuBufferBindingLayout) -> &mut Self { - self.buffer_shim(val); - self - } + #[wasm_bindgen(method, setter = "buffer")] + pub fn set_buffer(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuExternalTextureBindingLayout")] + #[doc = "Get the `externalTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "externalTexture")] + pub fn get_external_texture( + this: &GpuBindGroupLayoutEntry, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuExternalTextureBindingLayout")] #[doc = "Change the `externalTexture` field of this object."] @@ -80,10 +72,21 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn external_texture(&mut self, val: &GpuExternalTextureBindingLayout) -> &mut Self { - self.external_texture_shim(val); - self - } + #[wasm_bindgen(method, setter = "externalTexture")] + pub fn set_external_texture( + this: &GpuBindGroupLayoutEntry, + val: &GpuExternalTextureBindingLayout, + ); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingLayout")] + #[doc = "Get the `sampler` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampler")] + pub fn get_sampler(this: &GpuBindGroupLayoutEntry) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingLayout")] #[doc = "Change the `sampler` field of this object."] @@ -92,10 +95,20 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn sampler(&mut self, val: &GpuSamplerBindingLayout) -> &mut Self { - self.sampler_shim(val); - self - } + #[wasm_bindgen(method, setter = "sampler")] + pub fn set_sampler(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureBindingLayout")] + #[doc = "Get the `storageTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "storageTexture")] + pub fn get_storage_texture( + this: &GpuBindGroupLayoutEntry, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureBindingLayout")] #[doc = "Change the `storageTexture` field of this object."] @@ -104,10 +117,21 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn storage_texture(&mut self, val: &GpuStorageTextureBindingLayout) -> &mut Self { - self.storage_texture_shim(val); - self - } + #[wasm_bindgen(method, setter = "storageTexture")] + pub fn set_storage_texture( + this: &GpuBindGroupLayoutEntry, + val: &GpuStorageTextureBindingLayout, + ); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureBindingLayout")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "texture")] + pub fn get_texture(this: &GpuBindGroupLayoutEntry) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureBindingLayout")] #[doc = "Change the `texture` field of this object."] @@ -116,10 +140,17 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn texture(&mut self, val: &GpuTextureBindingLayout) -> &mut Self { - self.texture_shim(val); - self - } + #[wasm_bindgen(method, setter = "texture")] + pub fn set_texture(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `visibility` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "visibility")] + pub fn get_visibility(this: &GpuBindGroupLayoutEntry) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `visibility` field of this object."] #[doc = ""] @@ -127,8 +158,69 @@ impl GpuBindGroupLayoutEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "visibility")] + pub fn set_visibility(this: &GpuBindGroupLayoutEntry, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuBindGroupLayoutEntry { + #[doc = "Construct a new `GpuBindGroupLayoutEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(binding: u32, visibility: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.binding(binding); + ret.visibility(visibility); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_binding()` instead."] + pub fn binding(&mut self, val: u32) -> &mut Self { + self.set_binding(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingLayout")] + #[deprecated = "Use `set_buffer()` instead."] + pub fn buffer(&mut self, val: &GpuBufferBindingLayout) -> &mut Self { + self.set_buffer(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuExternalTextureBindingLayout")] + #[deprecated = "Use `set_external_texture()` instead."] + pub fn external_texture(&mut self, val: &GpuExternalTextureBindingLayout) -> &mut Self { + self.set_external_texture(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingLayout")] + #[deprecated = "Use `set_sampler()` instead."] + pub fn sampler(&mut self, val: &GpuSamplerBindingLayout) -> &mut Self { + self.set_sampler(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureBindingLayout")] + #[deprecated = "Use `set_storage_texture()` instead."] + pub fn storage_texture(&mut self, val: &GpuStorageTextureBindingLayout) -> &mut Self { + self.set_storage_texture(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureBindingLayout")] + #[deprecated = "Use `set_texture()` instead."] + pub fn texture(&mut self, val: &GpuTextureBindingLayout) -> &mut Self { + self.set_texture(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_visibility()` instead."] pub fn visibility(&mut self, val: u32) -> &mut Self { - self.visibility_shim(val); + self.set_visibility(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBlendComponent.rs b/crates/web-sys/src/features/gen_GpuBlendComponent.rs index 03ed104e2f1..10f53d345f4 100644 --- a/crates/web-sys/src/features/gen_GpuBlendComponent.rs +++ b/crates/web-sys/src/features/gen_GpuBlendComponent.rs @@ -14,15 +14,66 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + #[doc = "Get the `dstFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dstFactor")] + pub fn get_dst_factor(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] + #[doc = "Change the `dstFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dstFactor")] - fn dst_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); + pub fn set_dst_factor(this: &GpuBlendComponent, val: GpuBlendFactor); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendOperation")] + #[doc = "Get the `operation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "operation")] + pub fn get_operation(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendOperation")] + #[doc = "Change the `operation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "operation")] - fn operation_shim(this: &GpuBlendComponent, val: GpuBlendOperation); + pub fn set_operation(this: &GpuBlendComponent, val: GpuBlendOperation); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + #[doc = "Get the `srcFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "srcFactor")] + pub fn get_src_factor(this: &GpuBlendComponent) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] + #[doc = "Change the `srcFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "srcFactor")] - fn src_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); + pub fn set_src_factor(this: &GpuBlendComponent, val: GpuBlendFactor); } #[cfg(web_sys_unstable_apis)] impl GpuBlendComponent { @@ -39,38 +90,23 @@ impl GpuBlendComponent { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] - #[doc = "Change the `dstFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_dst_factor()` instead."] pub fn dst_factor(&mut self, val: GpuBlendFactor) -> &mut Self { - self.dst_factor_shim(val); + self.set_dst_factor(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendOperation")] - #[doc = "Change the `operation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_operation()` instead."] pub fn operation(&mut self, val: GpuBlendOperation) -> &mut Self { - self.operation_shim(val); + self.set_operation(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendFactor")] - #[doc = "Change the `srcFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src_factor()` instead."] pub fn src_factor(&mut self, val: GpuBlendFactor) -> &mut Self { - self.src_factor_shim(val); + self.set_src_factor(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBlendState.rs b/crates/web-sys/src/features/gen_GpuBlendState.rs index 80b609acd5d..cdb7dc9f043 100644 --- a/crates/web-sys/src/features/gen_GpuBlendState.rs +++ b/crates/web-sys/src/features/gen_GpuBlendState.rs @@ -14,12 +14,46 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBlendState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &GpuBlendState) -> GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &GpuBlendState, val: &GpuBlendComponent); + pub fn set_alpha(this: &GpuBlendState, val: &GpuBlendComponent); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + #[doc = "Get the `color` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "color")] + pub fn get_color(this: &GpuBlendState) -> GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] + #[doc = "Change the `color` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "color")] - fn color_shim(this: &GpuBlendState, val: &GpuBlendComponent); + pub fn set_color(this: &GpuBlendState, val: &GpuBlendComponent); } #[cfg(web_sys_unstable_apis)] impl GpuBlendState { @@ -39,26 +73,16 @@ impl GpuBlendState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: &GpuBlendComponent) -> &mut Self { - self.alpha_shim(val); + self.set_alpha(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendComponent")] - #[doc = "Change the `color` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color()` instead."] pub fn color(&mut self, val: &GpuBlendComponent) -> &mut Self { - self.color_shim(val); + self.set_color(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferBinding.rs b/crates/web-sys/src/features/gen_GpuBufferBinding.rs index 170abfdb707..312055ad44f 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBinding.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBinding.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferBinding; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "buffer")] + pub fn get_buffer(this: &GpuBufferBinding) -> GpuBuffer; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuBufferBinding, val: &GpuBuffer); + pub fn set_buffer(this: &GpuBufferBinding, val: &GpuBuffer); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &GpuBufferBinding) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuBufferBinding, val: f64); + pub fn set_offset(this: &GpuBufferBinding, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &GpuBufferBinding) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuBufferBinding, val: f64); + pub fn set_size(this: &GpuBufferBinding, val: f64); } #[cfg(web_sys_unstable_apis)] impl GpuBufferBinding { @@ -39,36 +88,21 @@ impl GpuBufferBinding { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { - self.buffer_shim(val); + self.set_buffer(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: f64) -> &mut Self { - self.size_shim(val); + self.set_size(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs index b78b7a4c753..47def45064b 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasDynamicOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "hasDynamicOffset")] + pub fn get_has_dynamic_offset(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `hasDynamicOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "hasDynamicOffset")] - fn has_dynamic_offset_shim(this: &GpuBufferBindingLayout, val: bool); + pub fn set_has_dynamic_offset(this: &GpuBufferBindingLayout, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `minBindingSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "minBindingSize")] + pub fn get_min_binding_size(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `minBindingSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "minBindingSize")] - fn min_binding_size_shim(this: &GpuBufferBindingLayout, val: f64); + pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &GpuBufferBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); + pub fn set_type(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); } #[cfg(web_sys_unstable_apis)] impl GpuBufferBindingLayout { @@ -36,37 +85,22 @@ impl GpuBufferBindingLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `hasDynamicOffset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_has_dynamic_offset()` instead."] pub fn has_dynamic_offset(&mut self, val: bool) -> &mut Self { - self.has_dynamic_offset_shim(val); + self.set_has_dynamic_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `minBindingSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min_binding_size()` instead."] pub fn min_binding_size(&mut self, val: f64) -> &mut Self { - self.min_binding_size_shim(val); + self.set_min_binding_size(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBufferBindingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuBufferBindingType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs index 432a97950b9..536aa9c409d 100644 --- a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBufferDescriptor, val: &str); - #[wasm_bindgen(method, setter = "mappedAtCreation")] - fn mapped_at_creation_shim(this: &GpuBufferDescriptor, val: bool); - #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuBufferDescriptor, val: f64); - #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuBufferDescriptor, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuBufferDescriptor { - #[doc = "Construct a new `GpuBufferDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(size: f64, usage: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.size(size); - ret.usage(usage); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuBufferDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -45,10 +30,17 @@ impl GpuBufferDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuBufferDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mappedAtCreation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mappedAtCreation")] + pub fn get_mapped_at_creation(this: &GpuBufferDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mappedAtCreation` field of this object."] #[doc = ""] @@ -56,10 +48,17 @@ impl GpuBufferDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mapped_at_creation(&mut self, val: bool) -> &mut Self { - self.mapped_at_creation_shim(val); - self - } + #[wasm_bindgen(method, setter = "mappedAtCreation")] + pub fn set_mapped_at_creation(this: &GpuBufferDescriptor, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &GpuBufferDescriptor) -> f64; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `size` field of this object."] #[doc = ""] @@ -67,10 +66,17 @@ impl GpuBufferDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn size(&mut self, val: f64) -> &mut Self { - self.size_shim(val); - self - } + #[wasm_bindgen(method, setter = "size")] + pub fn set_size(this: &GpuBufferDescriptor, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &GpuBufferDescriptor) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usage` field of this object."] #[doc = ""] @@ -78,8 +84,46 @@ impl GpuBufferDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "usage")] + pub fn set_usage(this: &GpuBufferDescriptor, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuBufferDescriptor { + #[doc = "Construct a new `GpuBufferDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(size: f64, usage: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.size(size); + ret.usage(usage); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mapped_at_creation()` instead."] + pub fn mapped_at_creation(&mut self, val: bool) -> &mut Self { + self.set_mapped_at_creation(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_size()` instead."] + pub fn size(&mut self, val: f64) -> &mut Self { + self.set_size(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); + self.set_usage(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs index 151e60d979b..220fcebe4d7 100644 --- a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs +++ b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs @@ -14,19 +14,102 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCanvasConfiguration; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCanvasAlphaMode")] + #[doc = "Get the `alphaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "alphaMode")] + pub fn get_alpha_mode(this: &GpuCanvasConfiguration) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCanvasAlphaMode")] + #[doc = "Change the `alphaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "alphaMode")] - fn alpha_mode_shim(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); + pub fn set_alpha_mode(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "device")] + pub fn get_device(this: &GpuCanvasConfiguration) -> GpuDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &GpuCanvasConfiguration, val: &GpuDevice); + pub fn set_device(this: &GpuCanvasConfiguration, val: &GpuDevice); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuCanvasConfiguration) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuCanvasConfiguration, val: GpuTextureFormat); + pub fn set_format(this: &GpuCanvasConfiguration, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &GpuCanvasConfiguration) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuCanvasConfiguration, val: u32); + pub fn set_usage(this: &GpuCanvasConfiguration, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "viewFormats")] + pub fn get_view_formats(this: &GpuCanvasConfiguration) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewFormats")] - fn view_formats_shim(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_view_formats(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuCanvasConfiguration { @@ -46,60 +129,35 @@ impl GpuCanvasConfiguration { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCanvasAlphaMode")] - #[doc = "Change the `alphaMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_alpha_mode()` instead."] pub fn alpha_mode(&mut self, val: GpuCanvasAlphaMode) -> &mut Self { - self.alpha_mode_shim(val); + self.set_alpha_mode(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &GpuDevice) -> &mut Self { - self.device_shim(val); + self.set_device(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); + self.set_usage(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `viewFormats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_formats()` instead."] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.view_formats_shim(val); + self.set_view_formats(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuColorDict.rs b/crates/web-sys/src/features/gen_GpuColorDict.rs index 43041c4c8d6..38af75d3cb3 100644 --- a/crates/web-sys/src/features/gen_GpuColorDict.rs +++ b/crates/web-sys/src/features/gen_GpuColorDict.rs @@ -14,14 +14,78 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuColorDict; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "a")] + pub fn get_a(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &GpuColorDict, val: f64); + pub fn set_a(this: &GpuColorDict, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "b")] + pub fn get_b(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &GpuColorDict, val: f64); + pub fn set_b(this: &GpuColorDict, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `g` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "g")] + pub fn get_g(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `g` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "g")] - fn g_shim(this: &GpuColorDict, val: f64); + pub fn set_g(this: &GpuColorDict, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "r")] + pub fn get_r(this: &GpuColorDict) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "r")] - fn r_shim(this: &GpuColorDict, val: f64); + pub fn set_r(this: &GpuColorDict, val: f64); } #[cfg(web_sys_unstable_apis)] impl GpuColorDict { @@ -41,47 +105,27 @@ impl GpuColorDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `a` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_a()` instead."] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `b` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_b()` instead."] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `g` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_g()` instead."] pub fn g(&mut self, val: f64) -> &mut Self { - self.g_shim(val); + self.set_g(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `r` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_r()` instead."] pub fn r(&mut self, val: f64) -> &mut Self { - self.r_shim(val); + self.set_r(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuColorTargetState.rs b/crates/web-sys/src/features/gen_GpuColorTargetState.rs index 252c6c88da2..e4b651285fd 100644 --- a/crates/web-sys/src/features/gen_GpuColorTargetState.rs +++ b/crates/web-sys/src/features/gen_GpuColorTargetState.rs @@ -14,14 +14,64 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuColorTargetState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendState")] + #[doc = "Get the `blend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "blend")] + pub fn get_blend(this: &GpuColorTargetState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendState")] + #[doc = "Change the `blend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "blend")] - fn blend_shim(this: &GpuColorTargetState, val: &GpuBlendState); + pub fn set_blend(this: &GpuColorTargetState, val: &GpuBlendState); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuColorTargetState) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuColorTargetState, val: GpuTextureFormat); + pub fn set_format(this: &GpuColorTargetState, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `writeMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "writeMask")] + pub fn get_write_mask(this: &GpuColorTargetState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `writeMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "writeMask")] - fn write_mask_shim(this: &GpuColorTargetState, val: u32); + pub fn set_write_mask(this: &GpuColorTargetState, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuColorTargetState { @@ -40,37 +90,22 @@ impl GpuColorTargetState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBlendState")] - #[doc = "Change the `blend` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_blend()` instead."] pub fn blend(&mut self, val: &GpuBlendState) -> &mut Self { - self.blend_shim(val); + self.set_blend(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `writeMask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_write_mask()` instead."] pub fn write_mask(&mut self, val: u32) -> &mut Self { - self.write_mask_shim(val); + self.set_write_mask(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs index 556718c1c69..af0d4b1455b 100644 --- a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCommandBufferDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuCommandBufferDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuCommandBufferDescriptor, val: &str); + pub fn set_label(this: &GpuCommandBufferDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuCommandBufferDescriptor { @@ -31,14 +47,9 @@ impl GpuCommandBufferDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs index 5e6cb5ae4d6..e883bd9c31e 100644 --- a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCommandEncoderDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuCommandEncoderDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuCommandEncoderDescriptor, val: &str); + pub fn set_label(this: &GpuCommandEncoderDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuCommandEncoderDescriptor { @@ -31,14 +47,9 @@ impl GpuCommandEncoderDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs index ba493a46692..0da84742aa8 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs @@ -14,11 +14,49 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePassDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuComputePassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuComputePassDescriptor, val: &str); + pub fn set_label(this: &GpuComputePassDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuComputePassTimestampWrites")] + #[doc = "Get the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestampWrites")] + pub fn get_timestamp_writes( + this: &GpuComputePassDescriptor, + ) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuComputePassTimestampWrites")] + #[doc = "Change the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestampWrites")] - fn timestamp_writes_shim(this: &GpuComputePassDescriptor, val: &GpuComputePassTimestampWrites); + pub fn set_timestamp_writes( + this: &GpuComputePassDescriptor, + val: &GpuComputePassTimestampWrites, + ); } #[cfg(web_sys_unstable_apis)] impl GpuComputePassDescriptor { @@ -34,26 +72,16 @@ impl GpuComputePassDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuComputePassTimestampWrites")] - #[doc = "Change the `timestampWrites` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp_writes()` instead."] pub fn timestamp_writes(&mut self, val: &GpuComputePassTimestampWrites) -> &mut Self { - self.timestamp_writes_shim(val); + self.set_timestamp_writes(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs index fec406f183f..5ff73d7fd3c 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePassTimestampWrites; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] + pub fn get_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn beginning_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + pub fn set_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] + pub fn get_end_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn end_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + pub fn set_end_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "querySet")] + pub fn get_query_set(this: &GpuComputePassTimestampWrites) -> GpuQuerySet; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "querySet")] - fn query_set_shim(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); + pub fn set_query_set(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); } #[cfg(web_sys_unstable_apis)] impl GpuComputePassTimestampWrites { @@ -38,37 +87,22 @@ impl GpuComputePassTimestampWrites { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_beginning_of_pass_write_index()` instead."] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.beginning_of_pass_write_index_shim(val); + self.set_beginning_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `endOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_end_of_pass_write_index()` instead."] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.end_of_pass_write_index_shim(val); + self.set_end_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `querySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_query_set()` instead."] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.query_set_shim(val); + self.set_query_set(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs index ad49e55c478..0dc1e1a0423 100644 --- a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePipelineDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuComputePipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuComputePipelineDescriptor, val: &str); + pub fn set_label(this: &GpuComputePipelineDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuComputePipelineDescriptor) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuProgrammableStage")] + #[doc = "Get the `compute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "compute")] + pub fn get_compute(this: &GpuComputePipelineDescriptor) -> GpuProgrammableStage; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuProgrammableStage")] + #[doc = "Change the `compute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compute")] - fn compute_shim(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); + pub fn set_compute(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); } #[cfg(web_sys_unstable_apis)] impl GpuComputePipelineDescriptor { @@ -39,37 +88,22 @@ impl GpuComputePipelineDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuProgrammableStage")] - #[doc = "Change the `compute` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compute()` instead."] pub fn compute(&mut self, val: &GpuProgrammableStage) -> &mut Self { - self.compute_shim(val); + self.set_compute(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs index f991cd4c9b4..0c9a964b7f2 100644 --- a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs +++ b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs @@ -14,46 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuDepthStencilState; - #[wasm_bindgen(method, setter = "depthBias")] - fn depth_bias_shim(this: &GpuDepthStencilState, val: i32); - #[wasm_bindgen(method, setter = "depthBiasClamp")] - fn depth_bias_clamp_shim(this: &GpuDepthStencilState, val: f32); - #[wasm_bindgen(method, setter = "depthBiasSlopeScale")] - fn depth_bias_slope_scale_shim(this: &GpuDepthStencilState, val: f32); - #[cfg(feature = "GpuCompareFunction")] - #[wasm_bindgen(method, setter = "depthCompare")] - fn depth_compare_shim(this: &GpuDepthStencilState, val: GpuCompareFunction); - #[wasm_bindgen(method, setter = "depthWriteEnabled")] - fn depth_write_enabled_shim(this: &GpuDepthStencilState, val: bool); - #[cfg(feature = "GpuTextureFormat")] - #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuDepthStencilState, val: GpuTextureFormat); - #[cfg(feature = "GpuStencilFaceState")] - #[wasm_bindgen(method, setter = "stencilBack")] - fn stencil_back_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); - #[cfg(feature = "GpuStencilFaceState")] - #[wasm_bindgen(method, setter = "stencilFront")] - fn stencil_front_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); - #[wasm_bindgen(method, setter = "stencilReadMask")] - fn stencil_read_mask_shim(this: &GpuDepthStencilState, val: u32); - #[wasm_bindgen(method, setter = "stencilWriteMask")] - fn stencil_write_mask_shim(this: &GpuDepthStencilState, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuDepthStencilState { - #[cfg(feature = "GpuTextureFormat")] - #[doc = "Construct a new `GpuDepthStencilState`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBias` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(format: GpuTextureFormat) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); - ret - } + #[wasm_bindgen(method, getter = "depthBias")] + pub fn get_depth_bias(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthBias` field of this object."] #[doc = ""] @@ -61,10 +30,17 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_bias(&mut self, val: i32) -> &mut Self { - self.depth_bias_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthBias")] + pub fn set_depth_bias(this: &GpuDepthStencilState, val: i32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBiasClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthBiasClamp")] + pub fn get_depth_bias_clamp(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthBiasClamp` field of this object."] #[doc = ""] @@ -72,10 +48,17 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_bias_clamp(&mut self, val: f32) -> &mut Self { - self.depth_bias_clamp_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthBiasClamp")] + pub fn set_depth_bias_clamp(this: &GpuDepthStencilState, val: f32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBiasSlopeScale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthBiasSlopeScale")] + pub fn get_depth_bias_slope_scale(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthBiasSlopeScale` field of this object."] #[doc = ""] @@ -83,10 +66,18 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_bias_slope_scale(&mut self, val: f32) -> &mut Self { - self.depth_bias_slope_scale_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthBiasSlopeScale")] + pub fn set_depth_bias_slope_scale(this: &GpuDepthStencilState, val: f32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `depthCompare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthCompare")] + pub fn get_depth_compare(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] #[doc = "Change the `depthCompare` field of this object."] @@ -95,10 +86,17 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.depth_compare_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthCompare")] + pub fn set_depth_compare(this: &GpuDepthStencilState, val: GpuCompareFunction); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthWriteEnabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthWriteEnabled")] + pub fn get_depth_write_enabled(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthWriteEnabled` field of this object."] #[doc = ""] @@ -106,10 +104,18 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_write_enabled(&mut self, val: bool) -> &mut Self { - self.depth_write_enabled_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthWriteEnabled")] + pub fn set_depth_write_enabled(this: &GpuDepthStencilState, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuDepthStencilState) -> GpuTextureFormat; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Change the `format` field of this object."] @@ -118,10 +124,18 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); - self - } + #[wasm_bindgen(method, setter = "format")] + pub fn set_format(this: &GpuDepthStencilState, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Get the `stencilBack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilBack")] + pub fn get_stencil_back(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] #[doc = "Change the `stencilBack` field of this object."] @@ -130,10 +144,18 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_back(&mut self, val: &GpuStencilFaceState) -> &mut Self { - self.stencil_back_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilBack")] + pub fn set_stencil_back(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Get the `stencilFront` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilFront")] + pub fn get_stencil_front(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilFaceState")] #[doc = "Change the `stencilFront` field of this object."] @@ -142,10 +164,17 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_front(&mut self, val: &GpuStencilFaceState) -> &mut Self { - self.stencil_front_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilFront")] + pub fn set_stencil_front(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilReadMask")] + pub fn get_stencil_read_mask(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencilReadMask` field of this object."] #[doc = ""] @@ -153,10 +182,17 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_read_mask(&mut self, val: u32) -> &mut Self { - self.stencil_read_mask_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilReadMask")] + pub fn set_stencil_read_mask(this: &GpuDepthStencilState, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilWriteMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilWriteMask")] + pub fn get_stencil_write_mask(this: &GpuDepthStencilState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencilWriteMask` field of this object."] #[doc = ""] @@ -164,8 +200,86 @@ impl GpuDepthStencilState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "stencilWriteMask")] + pub fn set_stencil_write_mask(this: &GpuDepthStencilState, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuDepthStencilState { + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Construct a new `GpuDepthStencilState`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(format: GpuTextureFormat) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.format(format); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_bias()` instead."] + pub fn depth_bias(&mut self, val: i32) -> &mut Self { + self.set_depth_bias(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_bias_clamp()` instead."] + pub fn depth_bias_clamp(&mut self, val: f32) -> &mut Self { + self.set_depth_bias_clamp(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_bias_slope_scale()` instead."] + pub fn depth_bias_slope_scale(&mut self, val: f32) -> &mut Self { + self.set_depth_bias_slope_scale(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[deprecated = "Use `set_depth_compare()` instead."] + pub fn depth_compare(&mut self, val: GpuCompareFunction) -> &mut Self { + self.set_depth_compare(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_write_enabled()` instead."] + pub fn depth_write_enabled(&mut self, val: bool) -> &mut Self { + self.set_depth_write_enabled(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[deprecated = "Use `set_format()` instead."] + pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { + self.set_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[deprecated = "Use `set_stencil_back()` instead."] + pub fn stencil_back(&mut self, val: &GpuStencilFaceState) -> &mut Self { + self.set_stencil_back(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[deprecated = "Use `set_stencil_front()` instead."] + pub fn stencil_front(&mut self, val: &GpuStencilFaceState) -> &mut Self { + self.set_stencil_front(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil_read_mask()` instead."] + pub fn stencil_read_mask(&mut self, val: u32) -> &mut Self { + self.set_stencil_read_mask(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil_write_mask()` instead."] pub fn stencil_write_mask(&mut self, val: u32) -> &mut Self { - self.stencil_write_mask_shim(val); + self.set_stencil_write_mask(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs index 4507817ca89..02166f68a81 100644 --- a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuDeviceDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuDeviceDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuDeviceDescriptor, val: &str); + pub fn set_label(this: &GpuDeviceDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueueDescriptor")] + #[doc = "Get the `defaultQueue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "defaultQueue")] + pub fn get_default_queue(this: &GpuDeviceDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueueDescriptor")] + #[doc = "Change the `defaultQueue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "defaultQueue")] - fn default_queue_shim(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); + pub fn set_default_queue(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requiredFeatures")] + pub fn get_required_features(this: &GpuDeviceDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuDeviceDescriptor { @@ -36,37 +85,22 @@ impl GpuDeviceDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueueDescriptor")] - #[doc = "Change the `defaultQueue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_default_queue()` instead."] pub fn default_queue(&mut self, val: &GpuQueueDescriptor) -> &mut Self { - self.default_queue_shim(val); + self.set_default_queue(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs index b0c9f2338d1..afe482f277c 100644 --- a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs @@ -14,12 +14,60 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuExtent3dDict; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthOrArrayLayers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthOrArrayLayers")] + pub fn get_depth_or_array_layers(this: &GpuExtent3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthOrArrayLayers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthOrArrayLayers")] - fn depth_or_array_layers_shim(this: &GpuExtent3dDict, val: u32); + pub fn set_depth_or_array_layers(this: &GpuExtent3dDict, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &GpuExtent3dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &GpuExtent3dDict, val: u32); + pub fn set_height(this: &GpuExtent3dDict, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &GpuExtent3dDict) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &GpuExtent3dDict, val: u32); + pub fn set_width(this: &GpuExtent3dDict, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuExtent3dDict { @@ -36,36 +84,21 @@ impl GpuExtent3dDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthOrArrayLayers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_or_array_layers()` instead."] pub fn depth_or_array_layers(&mut self, val: u32) -> &mut Self { - self.depth_or_array_layers_shim(val); + self.set_depth_or_array_layers(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs index 13c397f5f3f..913093af5c6 100644 --- a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuExternalTextureDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuExternalTextureDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuExternalTextureDescriptor, val: &str); + pub fn set_label(this: &GpuExternalTextureDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &GpuExternalTextureDescriptor) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); + pub fn set_source(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl GpuExternalTextureDescriptor { @@ -34,25 +66,15 @@ impl GpuExternalTextureDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuFragmentState.rs b/crates/web-sys/src/features/gen_GpuFragmentState.rs index e39fe9e57cb..33c1059e584 100644 --- a/crates/web-sys/src/features/gen_GpuFragmentState.rs +++ b/crates/web-sys/src/features/gen_GpuFragmentState.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuFragmentState; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entryPoint")] + pub fn get_entry_point(this: &GpuFragmentState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuFragmentState, val: &str); + pub fn set_entry_point(this: &GpuFragmentState, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "module")] + pub fn get_module(this: &GpuFragmentState) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuFragmentState, val: &GpuShaderModule); + pub fn set_module(this: &GpuFragmentState, val: &GpuShaderModule); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `targets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "targets")] + pub fn get_targets(this: &GpuFragmentState) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `targets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "targets")] - fn targets_shim(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); + pub fn set_targets(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuFragmentState { @@ -39,37 +88,22 @@ impl GpuFragmentState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `targets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_targets()` instead."] pub fn targets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.targets_shim(val); + self.set_targets(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs index fdfcc69a438..153b4004980 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyBuffer; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytesPerRow")] + pub fn get_bytes_per_row(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytesPerRow")] - fn bytes_per_row_shim(this: &GpuImageCopyBuffer, val: u32); + pub fn set_bytes_per_row(this: &GpuImageCopyBuffer, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuImageCopyBuffer, val: f64); + pub fn set_offset(this: &GpuImageCopyBuffer, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "rowsPerImage")] + pub fn get_rows_per_image(this: &GpuImageCopyBuffer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rowsPerImage")] - fn rows_per_image_shim(this: &GpuImageCopyBuffer, val: u32); + pub fn set_rows_per_image(this: &GpuImageCopyBuffer, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "buffer")] + pub fn get_buffer(this: &GpuImageCopyBuffer) -> GpuBuffer; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] + #[doc = "Change the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuImageCopyBuffer, val: &GpuBuffer); + pub fn set_buffer(this: &GpuImageCopyBuffer, val: &GpuBuffer); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyBuffer { @@ -40,48 +105,28 @@ impl GpuImageCopyBuffer { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytesPerRow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes_per_row()` instead."] pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { - self.bytes_per_row_shim(val); + self.set_bytes_per_row(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `rowsPerImage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rows_per_image()` instead."] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { - self.rows_per_image_shim(val); + self.set_rows_per_image(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuBuffer")] - #[doc = "Change the `buffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffer()` instead."] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { - self.buffer_shim(val); + self.set_buffer(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs index 54c22ac9306..c471c154757 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs @@ -14,12 +14,60 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyExternalImage; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `flipY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "flipY")] + pub fn get_flip_y(this: &GpuImageCopyExternalImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `flipY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "flipY")] - fn flip_y_shim(this: &GpuImageCopyExternalImage, val: bool); + pub fn set_flip_y(this: &GpuImageCopyExternalImage, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &GpuImageCopyExternalImage) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &GpuImageCopyExternalImage) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); + pub fn set_source(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyExternalImage { @@ -36,36 +84,21 @@ impl GpuImageCopyExternalImage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `flipY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_flip_y()` instead."] pub fn flip_y(&mut self, val: bool) -> &mut Self { - self.flip_y_shim(val); + self.set_flip_y(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs index c461d41a126..96b81683bf3 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs @@ -14,16 +14,82 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyTexture; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[doc = "Get the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "aspect")] + pub fn get_aspect(this: &GpuImageCopyTexture) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] + #[doc = "Change the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuImageCopyTexture, val: GpuTextureAspect); + pub fn set_aspect(this: &GpuImageCopyTexture, val: GpuTextureAspect); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mipLevel")] + pub fn get_mip_level(this: &GpuImageCopyTexture) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mipLevel")] - fn mip_level_shim(this: &GpuImageCopyTexture, val: u32); + pub fn set_mip_level(this: &GpuImageCopyTexture, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &GpuImageCopyTexture) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "texture")] + pub fn get_texture(this: &GpuImageCopyTexture) -> GpuTexture; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] + #[doc = "Change the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuImageCopyTexture, val: &GpuTexture); + pub fn set_texture(this: &GpuImageCopyTexture, val: &GpuTexture); } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyTexture { @@ -42,48 +108,28 @@ impl GpuImageCopyTexture { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] - #[doc = "Change the `aspect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_aspect()` instead."] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); + self.set_aspect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `mipLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mip_level()` instead."] pub fn mip_level(&mut self, val: u32) -> &mut Self { - self.mip_level_shim(val); + self.set_mip_level(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] - #[doc = "Change the `texture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_texture()` instead."] pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { - self.texture_shim(val); + self.set_texture(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs index 554f63396d4..d0cc4179b3b 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs @@ -14,34 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyTextureTagged; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] - #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); - #[wasm_bindgen(method, setter = "mipLevel")] - fn mip_level_shim(this: &GpuImageCopyTextureTagged, val: u32); - #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "GpuTexture")] - #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuImageCopyTextureTagged, val: &GpuTexture); - #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn premultiplied_alpha_shim(this: &GpuImageCopyTextureTagged, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl GpuImageCopyTextureTagged { - #[cfg(feature = "GpuTexture")] - #[doc = "Construct a new `GpuImageCopyTextureTagged`."] + #[doc = "Get the `aspect` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTextureAspect`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(texture: &GpuTexture) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.texture(texture); - ret - } + #[wasm_bindgen(method, getter = "aspect")] + pub fn get_aspect(this: &GpuImageCopyTextureTagged) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] #[doc = "Change the `aspect` field of this object."] @@ -50,10 +32,17 @@ impl GpuImageCopyTextureTagged { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); - self - } + #[wasm_bindgen(method, setter = "aspect")] + pub fn set_aspect(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mipLevel")] + pub fn get_mip_level(this: &GpuImageCopyTextureTagged) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mipLevel` field of this object."] #[doc = ""] @@ -61,10 +50,17 @@ impl GpuImageCopyTextureTagged { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mip_level(&mut self, val: u32) -> &mut Self { - self.mip_level_shim(val); - self - } + #[wasm_bindgen(method, setter = "mipLevel")] + pub fn set_mip_level(this: &GpuImageCopyTextureTagged, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &GpuImageCopyTextureTagged) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `origin` field of this object."] #[doc = ""] @@ -72,10 +68,18 @@ impl GpuImageCopyTextureTagged { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); - self - } + #[wasm_bindgen(method, setter = "origin")] + pub fn set_origin(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "texture")] + pub fn get_texture(this: &GpuImageCopyTextureTagged) -> GpuTexture; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTexture")] #[doc = "Change the `texture` field of this object."] @@ -84,10 +88,17 @@ impl GpuImageCopyTextureTagged { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { - self.texture_shim(val); - self - } + #[wasm_bindgen(method, setter = "texture")] + pub fn set_texture(this: &GpuImageCopyTextureTagged, val: &GpuTexture); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "premultipliedAlpha")] + pub fn get_premultiplied_alpha(this: &GpuImageCopyTextureTagged) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `premultipliedAlpha` field of this object."] #[doc = ""] @@ -95,8 +106,54 @@ impl GpuImageCopyTextureTagged { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "premultipliedAlpha")] + pub fn set_premultiplied_alpha(this: &GpuImageCopyTextureTagged, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageCopyTextureTagged { + #[cfg(feature = "GpuTexture")] + #[doc = "Construct a new `GpuImageCopyTextureTagged`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(texture: &GpuTexture) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.texture(texture); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[deprecated = "Use `set_aspect()` instead."] + pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { + self.set_aspect(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mip_level()` instead."] + pub fn mip_level(&mut self, val: u32) -> &mut Self { + self.set_mip_level(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_origin()` instead."] + pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_origin(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + #[deprecated = "Use `set_texture()` instead."] + pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { + self.set_texture(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_premultiplied_alpha()` instead."] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { - self.premultiplied_alpha_shim(val); + self.set_premultiplied_alpha(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs index cb267577615..c0ecc701835 100644 --- a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs +++ b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageDataLayout; - #[wasm_bindgen(method, setter = "bytesPerRow")] - fn bytes_per_row_shim(this: &GpuImageDataLayout, val: u32); - #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuImageDataLayout, val: f64); - #[wasm_bindgen(method, setter = "rowsPerImage")] - fn rows_per_image_shim(this: &GpuImageDataLayout, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuImageDataLayout { - #[doc = "Construct a new `GpuImageDataLayout`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesPerRow` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "bytesPerRow")] + pub fn get_bytes_per_row(this: &GpuImageDataLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesPerRow` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl GpuImageDataLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { - self.bytes_per_row_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesPerRow")] + pub fn set_bytes_per_row(this: &GpuImageDataLayout, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &GpuImageDataLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `offset` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl GpuImageDataLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); - self - } + #[wasm_bindgen(method, setter = "offset")] + pub fn set_offset(this: &GpuImageDataLayout, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "rowsPerImage")] + pub fn get_rows_per_image(this: &GpuImageDataLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `rowsPerImage` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl GpuImageDataLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "rowsPerImage")] + pub fn set_rows_per_image(this: &GpuImageDataLayout, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageDataLayout { + #[doc = "Construct a new `GpuImageDataLayout`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_per_row()` instead."] + pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { + self.set_bytes_per_row(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_offset()` instead."] + pub fn offset(&mut self, val: f64) -> &mut Self { + self.set_offset(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_rows_per_image()` instead."] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { - self.rows_per_image_shim(val); + self.set_rows_per_image(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuMultisampleState.rs b/crates/web-sys/src/features/gen_GpuMultisampleState.rs index af9b5e2e8ec..7c969efbd9e 100644 --- a/crates/web-sys/src/features/gen_GpuMultisampleState.rs +++ b/crates/web-sys/src/features/gen_GpuMultisampleState.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuMultisampleState; - #[wasm_bindgen(method, setter = "alphaToCoverageEnabled")] - fn alpha_to_coverage_enabled_shim(this: &GpuMultisampleState, val: bool); - #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &GpuMultisampleState, val: u32); - #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &GpuMultisampleState, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuMultisampleState { - #[doc = "Construct a new `GpuMultisampleState`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alphaToCoverageEnabled` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "alphaToCoverageEnabled")] + pub fn get_alpha_to_coverage_enabled(this: &GpuMultisampleState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `alphaToCoverageEnabled` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl GpuMultisampleState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn alpha_to_coverage_enabled(&mut self, val: bool) -> &mut Self { - self.alpha_to_coverage_enabled_shim(val); - self - } + #[wasm_bindgen(method, setter = "alphaToCoverageEnabled")] + pub fn set_alpha_to_coverage_enabled(this: &GpuMultisampleState, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "count")] + pub fn get_count(this: &GpuMultisampleState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `count` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl GpuMultisampleState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); - self - } + #[wasm_bindgen(method, setter = "count")] + pub fn set_count(this: &GpuMultisampleState, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mask")] + pub fn get_mask(this: &GpuMultisampleState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mask` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl GpuMultisampleState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "mask")] + pub fn set_mask(this: &GpuMultisampleState, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuMultisampleState { + #[doc = "Construct a new `GpuMultisampleState`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_alpha_to_coverage_enabled()` instead."] + pub fn alpha_to_coverage_enabled(&mut self, val: bool) -> &mut Self { + self.set_alpha_to_coverage_enabled(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_count()` instead."] + pub fn count(&mut self, val: u32) -> &mut Self { + self.set_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: u32) -> &mut Self { - self.mask_shim(val); + self.set_mask(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs index 147e49b806a..37e3d9fa7b0 100644 --- a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuObjectDescriptorBase; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuObjectDescriptorBase) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuObjectDescriptorBase, val: &str); + pub fn set_label(this: &GpuObjectDescriptorBase, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuObjectDescriptorBase { @@ -31,14 +47,9 @@ impl GpuObjectDescriptorBase { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs index da5d620d658..a0732ec3fb6 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuOrigin2dDict; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &GpuOrigin2dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &GpuOrigin2dDict, val: u32); + pub fn set_x(this: &GpuOrigin2dDict, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &GpuOrigin2dDict) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &GpuOrigin2dDict, val: u32); + pub fn set_y(this: &GpuOrigin2dDict, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuOrigin2dDict { @@ -33,25 +65,15 @@ impl GpuOrigin2dDict { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: u32) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: u32) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs index ddca14f3aae..a14679d2d60 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuOrigin3dDict; - #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &GpuOrigin3dDict, val: u32); - #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &GpuOrigin3dDict, val: u32); - #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &GpuOrigin3dDict, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuOrigin3dDict { - #[doc = "Construct a new `GpuOrigin3dDict`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &GpuOrigin3dDict) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `x` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl GpuOrigin3dDict { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn x(&mut self, val: u32) -> &mut Self { - self.x_shim(val); - self - } + #[wasm_bindgen(method, setter = "x")] + pub fn set_x(this: &GpuOrigin3dDict, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &GpuOrigin3dDict) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `y` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl GpuOrigin3dDict { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn y(&mut self, val: u32) -> &mut Self { - self.y_shim(val); - self - } + #[wasm_bindgen(method, setter = "y")] + pub fn set_y(this: &GpuOrigin3dDict, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "z")] + pub fn get_z(this: &GpuOrigin3dDict) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `z` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl GpuOrigin3dDict { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "z")] + pub fn set_z(this: &GpuOrigin3dDict, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuOrigin3dDict { + #[doc = "Construct a new `GpuOrigin3dDict`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_x()` instead."] + pub fn x(&mut self, val: u32) -> &mut Self { + self.set_x(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_y()` instead."] + pub fn y(&mut self, val: u32) -> &mut Self { + self.set_y(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_z()` instead."] pub fn z(&mut self, val: u32) -> &mut Self { - self.z_shim(val); + self.set_z(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs index 8f94167a0c2..05a2206a33c 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineDescriptorBase; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuPipelineDescriptorBase) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuPipelineDescriptorBase, val: &str); + pub fn set_label(this: &GpuPipelineDescriptorBase, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuPipelineDescriptorBase) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineDescriptorBase { @@ -34,25 +66,15 @@ impl GpuPipelineDescriptorBase { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs index 4153f498d14..cc70a2d1386 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineErrorInit; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPipelineErrorReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &GpuPipelineErrorInit) -> GpuPipelineErrorReason; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPipelineErrorReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); + pub fn set_reason(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineErrorInit { @@ -35,14 +52,9 @@ impl GpuPipelineErrorInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPipelineErrorReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: GpuPipelineErrorReason) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs index a1113b81f2f..cff6b220139 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs @@ -14,10 +14,45 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineLayoutDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuPipelineLayoutDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuPipelineLayoutDescriptor, val: &str); + pub fn set_label(this: &GpuPipelineLayoutDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bindGroupLayouts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bindGroupLayouts")] + pub fn get_bind_group_layouts(this: &GpuPipelineLayoutDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bindGroupLayouts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bindGroupLayouts")] - fn bind_group_layouts_shim(this: &GpuPipelineLayoutDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_bind_group_layouts( + this: &GpuPipelineLayoutDescriptor, + val: &::wasm_bindgen::JsValue, + ); } #[cfg(web_sys_unstable_apis)] impl GpuPipelineLayoutDescriptor { @@ -34,25 +69,15 @@ impl GpuPipelineLayoutDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bindGroupLayouts` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bind_group_layouts()` instead."] pub fn bind_group_layouts(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.bind_group_layouts_shim(val); + self.set_bind_group_layouts(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs index 1c2c627c22a..aae66b1cde7 100644 --- a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs +++ b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs @@ -14,34 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPrimitiveState; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCullMode")] - #[wasm_bindgen(method, setter = "cullMode")] - fn cull_mode_shim(this: &GpuPrimitiveState, val: GpuCullMode); - #[cfg(feature = "GpuFrontFace")] - #[wasm_bindgen(method, setter = "frontFace")] - fn front_face_shim(this: &GpuPrimitiveState, val: GpuFrontFace); - #[cfg(feature = "GpuIndexFormat")] - #[wasm_bindgen(method, setter = "stripIndexFormat")] - fn strip_index_format_shim(this: &GpuPrimitiveState, val: GpuIndexFormat); - #[cfg(feature = "GpuPrimitiveTopology")] - #[wasm_bindgen(method, setter = "topology")] - fn topology_shim(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); - #[wasm_bindgen(method, setter = "unclippedDepth")] - fn unclipped_depth_shim(this: &GpuPrimitiveState, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl GpuPrimitiveState { - #[doc = "Construct a new `GpuPrimitiveState`."] + #[doc = "Get the `cullMode` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "cullMode")] + pub fn get_cull_mode(this: &GpuPrimitiveState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCullMode")] #[doc = "Change the `cullMode` field of this object."] @@ -50,10 +32,18 @@ impl GpuPrimitiveState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self { - self.cull_mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "cullMode")] + pub fn set_cull_mode(this: &GpuPrimitiveState, val: GpuCullMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFrontFace")] + #[doc = "Get the `frontFace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frontFace")] + pub fn get_front_face(this: &GpuPrimitiveState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFrontFace")] #[doc = "Change the `frontFace` field of this object."] @@ -62,10 +52,18 @@ impl GpuPrimitiveState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self { - self.front_face_shim(val); - self - } + #[wasm_bindgen(method, setter = "frontFace")] + pub fn set_front_face(this: &GpuPrimitiveState, val: GpuFrontFace); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuIndexFormat")] + #[doc = "Get the `stripIndexFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stripIndexFormat")] + pub fn get_strip_index_format(this: &GpuPrimitiveState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuIndexFormat")] #[doc = "Change the `stripIndexFormat` field of this object."] @@ -74,10 +72,18 @@ impl GpuPrimitiveState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self { - self.strip_index_format_shim(val); - self - } + #[wasm_bindgen(method, setter = "stripIndexFormat")] + pub fn set_strip_index_format(this: &GpuPrimitiveState, val: GpuIndexFormat); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveTopology")] + #[doc = "Get the `topology` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "topology")] + pub fn get_topology(this: &GpuPrimitiveState) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveTopology")] #[doc = "Change the `topology` field of this object."] @@ -86,10 +92,17 @@ impl GpuPrimitiveState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self { - self.topology_shim(val); - self - } + #[wasm_bindgen(method, setter = "topology")] + pub fn set_topology(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unclippedDepth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unclippedDepth")] + pub fn get_unclipped_depth(this: &GpuPrimitiveState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unclippedDepth` field of this object."] #[doc = ""] @@ -97,8 +110,54 @@ impl GpuPrimitiveState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "unclippedDepth")] + pub fn set_unclipped_depth(this: &GpuPrimitiveState, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl GpuPrimitiveState { + #[doc = "Construct a new `GpuPrimitiveState`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCullMode")] + #[deprecated = "Use `set_cull_mode()` instead."] + pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self { + self.set_cull_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFrontFace")] + #[deprecated = "Use `set_front_face()` instead."] + pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self { + self.set_front_face(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuIndexFormat")] + #[deprecated = "Use `set_strip_index_format()` instead."] + pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self { + self.set_strip_index_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveTopology")] + #[deprecated = "Use `set_topology()` instead."] + pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self { + self.set_topology(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unclipped_depth()` instead."] pub fn unclipped_depth(&mut self, val: bool) -> &mut Self { - self.unclipped_depth_shim(val); + self.set_unclipped_depth(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs index 2cce8beb098..3f929264764 100644 --- a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs +++ b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuProgrammableStage; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entryPoint")] + pub fn get_entry_point(this: &GpuProgrammableStage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuProgrammableStage, val: &str); + pub fn set_entry_point(this: &GpuProgrammableStage, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "module")] + pub fn get_module(this: &GpuProgrammableStage) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuProgrammableStage, val: &GpuShaderModule); + pub fn set_module(this: &GpuProgrammableStage, val: &GpuShaderModule); } #[cfg(web_sys_unstable_apis)] impl GpuProgrammableStage { @@ -36,26 +69,16 @@ impl GpuProgrammableStage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs index 5fab281c1c3..36f3383a7e8 100644 --- a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuQuerySetDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuQuerySetDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuQuerySetDescriptor, val: &str); + pub fn set_label(this: &GpuQuerySetDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "count")] + pub fn get_count(this: &GpuQuerySetDescriptor) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &GpuQuerySetDescriptor, val: u32); + pub fn set_count(this: &GpuQuerySetDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueryType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &GpuQuerySetDescriptor) -> GpuQueryType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueryType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuQuerySetDescriptor, val: GpuQueryType); + pub fn set_type(this: &GpuQuerySetDescriptor, val: GpuQueryType); } #[cfg(web_sys_unstable_apis)] impl GpuQuerySetDescriptor { @@ -39,37 +88,22 @@ impl GpuQuerySetDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `count` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_count()` instead."] pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); + self.set_count(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQueryType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuQueryType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs index e96c645e2bd..e07e624f8a5 100644 --- a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuQueueDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuQueueDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuQueueDescriptor, val: &str); + pub fn set_label(this: &GpuQueueDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuQueueDescriptor { @@ -31,14 +47,9 @@ impl GpuQueueDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs index 3100a8cda05..a250f0fe19f 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderBundleDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuRenderBundleDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderBundleDescriptor, val: &str); + pub fn set_label(this: &GpuRenderBundleDescriptor, val: &str); } #[cfg(web_sys_unstable_apis)] impl GpuRenderBundleDescriptor { @@ -31,14 +47,9 @@ impl GpuRenderBundleDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs index 82d76b71a56..895ff703e51 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs @@ -14,34 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderBundleEncoderDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderBundleEncoderDescriptor, val: &str); - #[wasm_bindgen(method, setter = "colorFormats")] - fn color_formats_shim(this: &GpuRenderBundleEncoderDescriptor, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "GpuTextureFormat")] - #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn depth_stencil_format_shim(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat); - #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuRenderBundleEncoderDescriptor, val: u32); - #[wasm_bindgen(method, setter = "depthReadOnly")] - fn depth_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); - #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn stencil_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl GpuRenderBundleEncoderDescriptor { - #[doc = "Construct a new `GpuRenderBundleEncoderDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.color_formats(color_formats); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuRenderBundleEncoderDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -49,10 +30,17 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuRenderBundleEncoderDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "colorFormats")] + pub fn get_color_formats(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `colorFormats` field of this object."] #[doc = ""] @@ -60,10 +48,23 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_formats_shim(val); - self - } + #[wasm_bindgen(method, setter = "colorFormats")] + pub fn set_color_formats( + this: &GpuRenderBundleEncoderDescriptor, + val: &::wasm_bindgen::JsValue, + ); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthStencilFormat")] + pub fn get_depth_stencil_format( + this: &GpuRenderBundleEncoderDescriptor, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Change the `depthStencilFormat` field of this object."] @@ -72,10 +73,17 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.depth_stencil_format_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthStencilFormat")] + pub fn set_depth_stencil_format(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleCount")] + pub fn get_sample_count(this: &GpuRenderBundleEncoderDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `sampleCount` field of this object."] #[doc = ""] @@ -83,10 +91,17 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "sampleCount")] + pub fn set_sample_count(this: &GpuRenderBundleEncoderDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthReadOnly")] + pub fn get_depth_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthReadOnly` field of this object."] #[doc = ""] @@ -94,10 +109,17 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_read_only(&mut self, val: bool) -> &mut Self { - self.depth_read_only_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthReadOnly")] + pub fn set_depth_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilReadOnly")] + pub fn get_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencilReadOnly` field of this object."] #[doc = ""] @@ -105,8 +127,58 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "stencilReadOnly")] + pub fn set_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderBundleEncoderDescriptor { + #[doc = "Construct a new `GpuRenderBundleEncoderDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.color_formats(color_formats); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_color_formats()` instead."] + pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_color_formats(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[deprecated = "Use `set_depth_stencil_format()` instead."] + pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { + self.set_depth_stencil_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_sample_count()` instead."] + pub fn sample_count(&mut self, val: u32) -> &mut Self { + self.set_sample_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_read_only()` instead."] + pub fn depth_read_only(&mut self, val: bool) -> &mut Self { + self.set_depth_read_only(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil_read_only()` instead."] pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { - self.stencil_read_only_shim(val); + self.set_stencil_read_only(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs index d0506938272..7df6be14024 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs @@ -14,22 +14,122 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassColorAttachment; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "clearValue")] + pub fn get_clear_value(this: &GpuRenderPassColorAttachment) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clearValue")] - fn clear_value_shim(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + pub fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthSlice` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthSlice")] + pub fn get_depth_slice(this: &GpuRenderPassColorAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `depthSlice` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthSlice")] - fn depth_slice_shim(this: &GpuRenderPassColorAttachment, val: u32); + pub fn set_depth_slice(this: &GpuRenderPassColorAttachment, val: u32); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `loadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "loadOp")] + pub fn get_load_op(this: &GpuRenderPassColorAttachment) -> GpuLoadOp; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Change the `loadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "loadOp")] - fn load_op_shim(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); + pub fn set_load_op(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `resolveTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "resolveTarget")] + pub fn get_resolve_target(this: &GpuRenderPassColorAttachment) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Change the `resolveTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "resolveTarget")] - fn resolve_target_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `storeOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "storeOp")] + pub fn get_store_op(this: &GpuRenderPassColorAttachment) -> GpuStoreOp; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] + #[doc = "Change the `storeOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "storeOp")] - fn store_op_shim(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); + pub fn set_store_op(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &GpuRenderPassColorAttachment) -> GpuTextureView; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassColorAttachment { @@ -53,73 +153,43 @@ impl GpuRenderPassColorAttachment { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clearValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_clear_value()` instead."] pub fn clear_value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.clear_value_shim(val); + self.set_clear_value(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `depthSlice` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_slice()` instead."] pub fn depth_slice(&mut self, val: u32) -> &mut Self { - self.depth_slice_shim(val); + self.set_depth_slice(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] - #[doc = "Change the `loadOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_load_op()` instead."] pub fn load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.load_op_shim(val); + self.set_load_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] - #[doc = "Change the `resolveTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_resolve_target()` instead."] pub fn resolve_target(&mut self, val: &GpuTextureView) -> &mut Self { - self.resolve_target_shim(val); + self.set_resolve_target(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] - #[doc = "Change the `storeOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_store_op()` instead."] pub fn store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.store_op_shim(val); + self.set_store_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs index 86f32e884fc..b7748828b22 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs @@ -14,45 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassDepthStencilAttachment; - #[wasm_bindgen(method, setter = "depthClearValue")] - fn depth_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: f32); - #[cfg(feature = "GpuLoadOp")] - #[wasm_bindgen(method, setter = "depthLoadOp")] - fn depth_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); - #[wasm_bindgen(method, setter = "depthReadOnly")] - fn depth_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); - #[cfg(feature = "GpuStoreOp")] - #[wasm_bindgen(method, setter = "depthStoreOp")] - fn depth_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); - #[wasm_bindgen(method, setter = "stencilClearValue")] - fn stencil_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: u32); - #[cfg(feature = "GpuLoadOp")] - #[wasm_bindgen(method, setter = "stencilLoadOp")] - fn stencil_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); - #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn stencil_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); - #[cfg(feature = "GpuStoreOp")] - #[wasm_bindgen(method, setter = "stencilStoreOp")] - fn stencil_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); - #[cfg(feature = "GpuTextureView")] - #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); -} -#[cfg(web_sys_unstable_apis)] -impl GpuRenderPassDepthStencilAttachment { - #[cfg(feature = "GpuTextureView")] - #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthClearValue` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(view: &GpuTextureView) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.view(view); - ret - } + #[wasm_bindgen(method, getter = "depthClearValue")] + pub fn get_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthClearValue` field of this object."] #[doc = ""] @@ -60,10 +30,18 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_clear_value(&mut self, val: f32) -> &mut Self { - self.depth_clear_value_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthClearValue")] + pub fn set_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: f32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `depthLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthLoadOp")] + pub fn get_depth_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] #[doc = "Change the `depthLoadOp` field of this object."] @@ -72,10 +50,17 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.depth_load_op_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthLoadOp")] + pub fn set_depth_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthReadOnly")] + pub fn get_depth_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthReadOnly` field of this object."] #[doc = ""] @@ -83,10 +68,18 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_read_only(&mut self, val: bool) -> &mut Self { - self.depth_read_only_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthReadOnly")] + pub fn set_depth_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `depthStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthStoreOp")] + pub fn get_depth_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] #[doc = "Change the `depthStoreOp` field of this object."] @@ -95,10 +88,17 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.depth_store_op_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthStoreOp")] + pub fn set_depth_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilClearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilClearValue")] + pub fn get_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencilClearValue` field of this object."] #[doc = ""] @@ -106,10 +106,18 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self { - self.stencil_clear_value_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilClearValue")] + pub fn set_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `stencilLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilLoadOp")] + pub fn get_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuLoadOp")] #[doc = "Change the `stencilLoadOp` field of this object."] @@ -118,10 +126,17 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.stencil_load_op_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilLoadOp")] + pub fn set_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilReadOnly")] + pub fn get_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencilReadOnly` field of this object."] #[doc = ""] @@ -129,10 +144,18 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { - self.stencil_read_only_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilReadOnly")] + pub fn set_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `stencilStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencilStoreOp")] + pub fn get_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStoreOp")] #[doc = "Change the `stencilStoreOp` field of this object."] @@ -141,10 +164,18 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.stencil_store_op_shim(val); - self - } + #[wasm_bindgen(method, setter = "stencilStoreOp")] + pub fn set_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> GpuTextureView; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureView")] #[doc = "Change the `view` field of this object."] @@ -153,8 +184,81 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "view")] + pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassDepthStencilAttachment { + #[cfg(feature = "GpuTextureView")] + #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(view: &GpuTextureView) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.view(view); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_clear_value()` instead."] + pub fn depth_clear_value(&mut self, val: f32) -> &mut Self { + self.set_depth_clear_value(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[deprecated = "Use `set_depth_load_op()` instead."] + pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self { + self.set_depth_load_op(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_read_only()` instead."] + pub fn depth_read_only(&mut self, val: bool) -> &mut Self { + self.set_depth_read_only(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[deprecated = "Use `set_depth_store_op()` instead."] + pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self { + self.set_depth_store_op(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil_clear_value()` instead."] + pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self { + self.set_stencil_clear_value(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[deprecated = "Use `set_stencil_load_op()` instead."] + pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self { + self.set_stencil_load_op(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil_read_only()` instead."] + pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { + self.set_stencil_read_only(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[deprecated = "Use `set_stencil_store_op()` instead."] + pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self { + self.set_stencil_store_op(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs index 7ba69a91ec3..4d388ca356e 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs @@ -14,24 +14,127 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPassDescriptor, val: &str); + pub fn set_label(this: &GpuRenderPassDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorAttachments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "colorAttachments")] + pub fn get_color_attachments(this: &GpuRenderPassDescriptor) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `colorAttachments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "colorAttachments")] - fn color_attachments_shim(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_color_attachments(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + #[doc = "Get the `depthStencilAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthStencilAttachment")] + pub fn get_depth_stencil_attachment( + this: &GpuRenderPassDescriptor, + ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + #[doc = "Change the `depthStencilAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencilAttachment")] - fn depth_stencil_attachment_shim( + pub fn set_depth_stencil_attachment( this: &GpuRenderPassDescriptor, val: &GpuRenderPassDepthStencilAttachment, ); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxDrawCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "maxDrawCount")] + pub fn get_max_draw_count(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `maxDrawCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "maxDrawCount")] - fn max_draw_count_shim(this: &GpuRenderPassDescriptor, val: f64); + pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: f64); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `occlusionQuerySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "occlusionQuerySet")] + pub fn get_occlusion_query_set(this: &GpuRenderPassDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `occlusionQuerySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "occlusionQuerySet")] - fn occlusion_query_set_shim(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); + pub fn set_occlusion_query_set(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassTimestampWrites")] + #[doc = "Get the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestampWrites")] + pub fn get_timestamp_writes( + this: &GpuRenderPassDescriptor, + ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassTimestampWrites")] + #[doc = "Change the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "timestampWrites")] - fn timestamp_writes_shim(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites); + pub fn set_timestamp_writes(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassDescriptor { @@ -48,75 +151,45 @@ impl GpuRenderPassDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `colorAttachments` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_color_attachments()` instead."] pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_attachments_shim(val); + self.set_color_attachments(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] - #[doc = "Change the `depthStencilAttachment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil_attachment()` instead."] pub fn depth_stencil_attachment( &mut self, val: &GpuRenderPassDepthStencilAttachment, ) -> &mut Self { - self.depth_stencil_attachment_shim(val); + self.set_depth_stencil_attachment(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `maxDrawCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max_draw_count()` instead."] pub fn max_draw_count(&mut self, val: f64) -> &mut Self { - self.max_draw_count_shim(val); + self.set_max_draw_count(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `occlusionQuerySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_occlusion_query_set()` instead."] pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.occlusion_query_set_shim(val); + self.set_occlusion_query_set(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuRenderPassTimestampWrites")] - #[doc = "Change the `timestampWrites` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_timestamp_writes()` instead."] pub fn timestamp_writes(&mut self, val: &GpuRenderPassTimestampWrites) -> &mut Self { - self.timestamp_writes_shim(val); + self.set_timestamp_writes(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs index 8ae5c2d3616..7977ece02ea 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassLayout; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPassLayout, val: &str); - #[wasm_bindgen(method, setter = "colorFormats")] - fn color_formats_shim(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "GpuTextureFormat")] - #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn depth_stencil_format_shim(this: &GpuRenderPassLayout, val: GpuTextureFormat); - #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuRenderPassLayout, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuRenderPassLayout { - #[doc = "Construct a new `GpuRenderPassLayout`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.color_formats(color_formats); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuRenderPassLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -45,10 +30,17 @@ impl GpuRenderPassLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuRenderPassLayout, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "colorFormats")] + pub fn get_color_formats(this: &GpuRenderPassLayout) -> ::js_sys::Array; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `colorFormats` field of this object."] #[doc = ""] @@ -56,10 +48,18 @@ impl GpuRenderPassLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_formats_shim(val); - self - } + #[wasm_bindgen(method, setter = "colorFormats")] + pub fn set_color_formats(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthStencilFormat")] + pub fn get_depth_stencil_format(this: &GpuRenderPassLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Change the `depthStencilFormat` field of this object."] @@ -68,10 +68,17 @@ impl GpuRenderPassLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.depth_stencil_format_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthStencilFormat")] + pub fn set_depth_stencil_format(this: &GpuRenderPassLayout, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleCount")] + pub fn get_sample_count(this: &GpuRenderPassLayout) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `sampleCount` field of this object."] #[doc = ""] @@ -79,8 +86,46 @@ impl GpuRenderPassLayout { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "sampleCount")] + pub fn set_sample_count(this: &GpuRenderPassLayout, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassLayout { + #[doc = "Construct a new `GpuRenderPassLayout`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.color_formats(color_formats); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_color_formats()` instead."] + pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_color_formats(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[deprecated = "Use `set_depth_stencil_format()` instead."] + pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { + self.set_depth_stencil_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_sample_count()` instead."] pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); + self.set_sample_count(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs index 3a97f58b8c7..20f9342c498 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassTimestampWrites; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] + pub fn get_beginning_of_pass_write_index(this: &GpuRenderPassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn beginning_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + pub fn set_beginning_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] + pub fn get_end_of_pass_write_index(this: &GpuRenderPassTimestampWrites) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn end_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + pub fn set_end_of_pass_write_index(this: &GpuRenderPassTimestampWrites, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "querySet")] + pub fn get_query_set(this: &GpuRenderPassTimestampWrites) -> GpuQuerySet; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] + #[doc = "Change the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "querySet")] - fn query_set_shim(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); + pub fn set_query_set(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassTimestampWrites { @@ -38,37 +87,22 @@ impl GpuRenderPassTimestampWrites { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `beginningOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_beginning_of_pass_write_index()` instead."] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.beginning_of_pass_write_index_shim(val); + self.set_beginning_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `endOfPassWriteIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_end_of_pass_write_index()` instead."] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.end_of_pass_write_index_shim(val); + self.set_end_of_pass_write_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuQuerySet")] - #[doc = "Change the `querySet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_query_set()` instead."] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.query_set_shim(val); + self.set_query_set(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs index 02dc5eec076..5db5163d669 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs @@ -14,25 +14,142 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPipelineDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPipelineDescriptor, val: &str); + pub fn set_label(this: &GpuRenderPipelineDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuRenderPipelineDescriptor) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDepthStencilState")] + #[doc = "Get the `depthStencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthStencil")] + pub fn get_depth_stencil(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDepthStencilState")] + #[doc = "Change the `depthStencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthStencil")] - fn depth_stencil_shim(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); + pub fn set_depth_stencil(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFragmentState")] + #[doc = "Get the `fragment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "fragment")] + pub fn get_fragment(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFragmentState")] + #[doc = "Change the `fragment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fragment")] - fn fragment_shim(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); + pub fn set_fragment(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMultisampleState")] + #[doc = "Get the `multisample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "multisample")] + pub fn get_multisample(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMultisampleState")] + #[doc = "Change the `multisample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "multisample")] - fn multisample_shim(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); + pub fn set_multisample(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveState")] + #[doc = "Get the `primitive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "primitive")] + pub fn get_primitive(this: &GpuRenderPipelineDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveState")] + #[doc = "Change the `primitive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "primitive")] - fn primitive_shim(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); + pub fn set_primitive(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexState")] + #[doc = "Get the `vertex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "vertex")] + pub fn get_vertex(this: &GpuRenderPipelineDescriptor) -> GpuVertexState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexState")] + #[doc = "Change the `vertex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "vertex")] - fn vertex_shim(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); + pub fn set_vertex(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); } #[cfg(web_sys_unstable_apis)] impl GpuRenderPipelineDescriptor { @@ -51,85 +168,50 @@ impl GpuRenderPipelineDescriptor { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuDepthStencilState")] - #[doc = "Change the `depthStencil` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_stencil()` instead."] pub fn depth_stencil(&mut self, val: &GpuDepthStencilState) -> &mut Self { - self.depth_stencil_shim(val); + self.set_depth_stencil(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFragmentState")] - #[doc = "Change the `fragment` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fragment()` instead."] pub fn fragment(&mut self, val: &GpuFragmentState) -> &mut Self { - self.fragment_shim(val); + self.set_fragment(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMultisampleState")] - #[doc = "Change the `multisample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_multisample()` instead."] pub fn multisample(&mut self, val: &GpuMultisampleState) -> &mut Self { - self.multisample_shim(val); + self.set_multisample(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPrimitiveState")] - #[doc = "Change the `primitive` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_primitive()` instead."] pub fn primitive(&mut self, val: &GpuPrimitiveState) -> &mut Self { - self.primitive_shim(val); + self.set_primitive(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexState")] - #[doc = "Change the `vertex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_vertex()` instead."] pub fn vertex(&mut self, val: &GpuVertexState) -> &mut Self { - self.vertex_shim(val); + self.set_vertex(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs index 084385ffb36..6fe27f97fb8 100644 --- a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs +++ b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRequestAdapterOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `forceFallbackAdapter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "forceFallbackAdapter")] + pub fn get_force_fallback_adapter(this: &GpuRequestAdapterOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `forceFallbackAdapter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "forceFallbackAdapter")] - fn force_fallback_adapter_shim(this: &GpuRequestAdapterOptions, val: bool); + pub fn set_force_fallback_adapter(this: &GpuRequestAdapterOptions, val: bool); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPowerPreference")] + #[doc = "Get the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "powerPreference")] + pub fn get_power_preference(this: &GpuRequestAdapterOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPowerPreference")] + #[doc = "Change the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "powerPreference")] - fn power_preference_shim(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); + pub fn set_power_preference(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); } #[cfg(web_sys_unstable_apis)] impl GpuRequestAdapterOptions { @@ -34,26 +67,16 @@ impl GpuRequestAdapterOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `forceFallbackAdapter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_force_fallback_adapter()` instead."] pub fn force_fallback_adapter(&mut self, val: bool) -> &mut Self { - self.force_fallback_adapter_shim(val); + self.set_force_fallback_adapter(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuPowerPreference")] - #[doc = "Change the `powerPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_power_preference()` instead."] pub fn power_preference(&mut self, val: GpuPowerPreference) -> &mut Self { - self.power_preference_shim(val); + self.set_power_preference(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs index 87da31c0180..bfce5d945ee 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuSamplerBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &GpuSamplerBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); + pub fn set_type(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); } #[cfg(web_sys_unstable_apis)] impl GpuSamplerBindingLayout { @@ -33,14 +50,9 @@ impl GpuSamplerBindingLayout { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuSamplerBindingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: GpuSamplerBindingType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs index eecc6c14c96..c8dcfc7f50f 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs @@ -14,49 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuSamplerDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuSamplerDescriptor, val: &str); - #[cfg(feature = "GpuAddressMode")] - #[wasm_bindgen(method, setter = "addressModeU")] - fn address_mode_u_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); - #[cfg(feature = "GpuAddressMode")] - #[wasm_bindgen(method, setter = "addressModeV")] - fn address_mode_v_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); - #[cfg(feature = "GpuAddressMode")] - #[wasm_bindgen(method, setter = "addressModeW")] - fn address_mode_w_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); - #[cfg(feature = "GpuCompareFunction")] - #[wasm_bindgen(method, setter = "compare")] - fn compare_shim(this: &GpuSamplerDescriptor, val: GpuCompareFunction); - #[wasm_bindgen(method, setter = "lodMaxClamp")] - fn lod_max_clamp_shim(this: &GpuSamplerDescriptor, val: f32); - #[wasm_bindgen(method, setter = "lodMinClamp")] - fn lod_min_clamp_shim(this: &GpuSamplerDescriptor, val: f32); - #[cfg(feature = "GpuFilterMode")] - #[wasm_bindgen(method, setter = "magFilter")] - fn mag_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); - #[wasm_bindgen(method, setter = "maxAnisotropy")] - fn max_anisotropy_shim(this: &GpuSamplerDescriptor, val: u16); - #[cfg(feature = "GpuFilterMode")] - #[wasm_bindgen(method, setter = "minFilter")] - fn min_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); - #[cfg(feature = "GpuMipmapFilterMode")] - #[wasm_bindgen(method, setter = "mipmapFilter")] - fn mipmap_filter_shim(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); -} -#[cfg(web_sys_unstable_apis)] -impl GpuSamplerDescriptor { - #[doc = "Construct a new `GpuSamplerDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -64,10 +30,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuSamplerDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeU` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "addressModeU")] + pub fn get_address_mode_u(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Change the `addressModeU` field of this object."] @@ -76,10 +50,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn address_mode_u(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_u_shim(val); - self - } + #[wasm_bindgen(method, setter = "addressModeU")] + pub fn set_address_mode_u(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeV` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "addressModeV")] + pub fn get_address_mode_v(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Change the `addressModeV` field of this object."] @@ -88,10 +70,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn address_mode_v(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_v_shim(val); - self - } + #[wasm_bindgen(method, setter = "addressModeV")] + pub fn set_address_mode_v(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeW` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "addressModeW")] + pub fn get_address_mode_w(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuAddressMode")] #[doc = "Change the `addressModeW` field of this object."] @@ -100,10 +90,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn address_mode_w(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_w_shim(val); - self - } + #[wasm_bindgen(method, setter = "addressModeW")] + pub fn set_address_mode_w(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "compare")] + pub fn get_compare(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] #[doc = "Change the `compare` field of this object."] @@ -112,10 +110,17 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.compare_shim(val); - self - } + #[wasm_bindgen(method, setter = "compare")] + pub fn set_compare(this: &GpuSamplerDescriptor, val: GpuCompareFunction); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lodMaxClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "lodMaxClamp")] + pub fn get_lod_max_clamp(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `lodMaxClamp` field of this object."] #[doc = ""] @@ -123,10 +128,17 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn lod_max_clamp(&mut self, val: f32) -> &mut Self { - self.lod_max_clamp_shim(val); - self - } + #[wasm_bindgen(method, setter = "lodMaxClamp")] + pub fn set_lod_max_clamp(this: &GpuSamplerDescriptor, val: f32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lodMinClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "lodMinClamp")] + pub fn get_lod_min_clamp(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `lodMinClamp` field of this object."] #[doc = ""] @@ -134,10 +146,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn lod_min_clamp(&mut self, val: f32) -> &mut Self { - self.lod_min_clamp_shim(val); - self - } + #[wasm_bindgen(method, setter = "lodMinClamp")] + pub fn set_lod_min_clamp(this: &GpuSamplerDescriptor, val: f32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[doc = "Get the `magFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "magFilter")] + pub fn get_mag_filter(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] #[doc = "Change the `magFilter` field of this object."] @@ -146,10 +166,17 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mag_filter(&mut self, val: GpuFilterMode) -> &mut Self { - self.mag_filter_shim(val); - self - } + #[wasm_bindgen(method, setter = "magFilter")] + pub fn set_mag_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxAnisotropy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "maxAnisotropy")] + pub fn get_max_anisotropy(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `maxAnisotropy` field of this object."] #[doc = ""] @@ -157,10 +184,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn max_anisotropy(&mut self, val: u16) -> &mut Self { - self.max_anisotropy_shim(val); - self - } + #[wasm_bindgen(method, setter = "maxAnisotropy")] + pub fn set_max_anisotropy(this: &GpuSamplerDescriptor, val: u16); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[doc = "Get the `minFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "minFilter")] + pub fn get_min_filter(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuFilterMode")] #[doc = "Change the `minFilter` field of this object."] @@ -169,10 +204,18 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn min_filter(&mut self, val: GpuFilterMode) -> &mut Self { - self.min_filter_shim(val); - self - } + #[wasm_bindgen(method, setter = "minFilter")] + pub fn set_min_filter(this: &GpuSamplerDescriptor, val: GpuFilterMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMipmapFilterMode")] + #[doc = "Get the `mipmapFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMipmapFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mipmapFilter")] + pub fn get_mipmap_filter(this: &GpuSamplerDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuMipmapFilterMode")] #[doc = "Change the `mipmapFilter` field of this object."] @@ -181,8 +224,93 @@ impl GpuSamplerDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "mipmapFilter")] + pub fn set_mipmap_filter(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); +} +#[cfg(web_sys_unstable_apis)] +impl GpuSamplerDescriptor { + #[doc = "Construct a new `GpuSamplerDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[deprecated = "Use `set_address_mode_u()` instead."] + pub fn address_mode_u(&mut self, val: GpuAddressMode) -> &mut Self { + self.set_address_mode_u(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[deprecated = "Use `set_address_mode_v()` instead."] + pub fn address_mode_v(&mut self, val: GpuAddressMode) -> &mut Self { + self.set_address_mode_v(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[deprecated = "Use `set_address_mode_w()` instead."] + pub fn address_mode_w(&mut self, val: GpuAddressMode) -> &mut Self { + self.set_address_mode_w(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[deprecated = "Use `set_compare()` instead."] + pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { + self.set_compare(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_lod_max_clamp()` instead."] + pub fn lod_max_clamp(&mut self, val: f32) -> &mut Self { + self.set_lod_max_clamp(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_lod_min_clamp()` instead."] + pub fn lod_min_clamp(&mut self, val: f32) -> &mut Self { + self.set_lod_min_clamp(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[deprecated = "Use `set_mag_filter()` instead."] + pub fn mag_filter(&mut self, val: GpuFilterMode) -> &mut Self { + self.set_mag_filter(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_max_anisotropy()` instead."] + pub fn max_anisotropy(&mut self, val: u16) -> &mut Self { + self.set_max_anisotropy(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[deprecated = "Use `set_min_filter()` instead."] + pub fn min_filter(&mut self, val: GpuFilterMode) -> &mut Self { + self.set_min_filter(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMipmapFilterMode")] + #[deprecated = "Use `set_mipmap_filter()` instead."] pub fn mipmap_filter(&mut self, val: GpuMipmapFilterMode) -> &mut Self { - self.mipmap_filter_shim(val); + self.set_mipmap_filter(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs index 872f504ce07..f2c1369207e 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuShaderModuleCompilationHint; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entryPoint")] + pub fn get_entry_point(this: &GpuShaderModuleCompilationHint) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuShaderModuleCompilationHint, val: &str); + pub fn set_entry_point(this: &GpuShaderModuleCompilationHint, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuShaderModuleCompilationHint) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuShaderModuleCompilationHint { @@ -34,25 +66,15 @@ impl GpuShaderModuleCompilationHint { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs index f8ed57202ac..69c2204e7a9 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs @@ -14,29 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuShaderModuleDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuShaderModuleDescriptor, val: &str); - #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &GpuShaderModuleDescriptor, val: &str); - #[wasm_bindgen(method, setter = "compilationHints")] - fn compilation_hints_shim(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "sourceMap")] - fn source_map_shim(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); -} -#[cfg(web_sys_unstable_apis)] -impl GpuShaderModuleDescriptor { - #[doc = "Construct a new `GpuShaderModuleDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(code: &str) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.code(code); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuShaderModuleDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -44,10 +30,17 @@ impl GpuShaderModuleDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuShaderModuleDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "code")] + pub fn get_code(this: &GpuShaderModuleDescriptor) -> String; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `code` field of this object."] #[doc = ""] @@ -55,10 +48,17 @@ impl GpuShaderModuleDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn code(&mut self, val: &str) -> &mut Self { - self.code_shim(val); - self - } + #[wasm_bindgen(method, setter = "code")] + pub fn set_code(this: &GpuShaderModuleDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `compilationHints` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "compilationHints")] + pub fn get_compilation_hints(this: &GpuShaderModuleDescriptor) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `compilationHints` field of this object."] #[doc = ""] @@ -66,10 +66,17 @@ impl GpuShaderModuleDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn compilation_hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.compilation_hints_shim(val); - self - } + #[wasm_bindgen(method, setter = "compilationHints")] + pub fn set_compilation_hints(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sourceMap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sourceMap")] + pub fn get_source_map(this: &GpuShaderModuleDescriptor) -> Option<::js_sys::Object>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `sourceMap` field of this object."] #[doc = ""] @@ -77,8 +84,45 @@ impl GpuShaderModuleDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "sourceMap")] + pub fn set_source_map(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +impl GpuShaderModuleDescriptor { + #[doc = "Construct a new `GpuShaderModuleDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(code: &str) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.code(code); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_code()` instead."] + pub fn code(&mut self, val: &str) -> &mut Self { + self.set_code(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_compilation_hints()` instead."] + pub fn compilation_hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_compilation_hints(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_source_map()` instead."] pub fn source_map(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_map_shim(val); + self.set_source_map(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs index aa72d7b9431..8aba11bb319 100644 --- a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs +++ b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs @@ -14,18 +14,86 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuStencilFaceState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "compare")] + pub fn get_compare(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] + #[doc = "Change the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "compare")] - fn compare_shim(this: &GpuStencilFaceState, val: GpuCompareFunction); + pub fn set_compare(this: &GpuStencilFaceState, val: GpuCompareFunction); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `depthFailOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthFailOp")] + pub fn get_depth_fail_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `depthFailOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "depthFailOp")] - fn depth_fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_depth_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `failOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "failOp")] + pub fn get_fail_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `failOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "failOp")] - fn fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `passOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "passOp")] + pub fn get_pass_op(this: &GpuStencilFaceState) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] + #[doc = "Change the `passOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "passOp")] - fn pass_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + pub fn set_pass_op(this: &GpuStencilFaceState, val: GpuStencilOperation); } #[cfg(web_sys_unstable_apis)] impl GpuStencilFaceState { @@ -42,50 +110,30 @@ impl GpuStencilFaceState { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuCompareFunction")] - #[doc = "Change the `compare` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_compare()` instead."] pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.compare_shim(val); + self.set_compare(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `depthFailOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_depth_fail_op()` instead."] pub fn depth_fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.depth_fail_op_shim(val); + self.set_depth_fail_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `failOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_fail_op()` instead."] pub fn fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.fail_op_shim(val); + self.set_fail_op(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStencilOperation")] - #[doc = "Change the `passOp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_pass_op()` instead."] pub fn pass_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.pass_op_shim(val); + self.set_pass_op(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs index 36adc75a02f..dfba66d770f 100644 --- a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs @@ -14,15 +14,68 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuStorageTextureBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureAccess")] + #[doc = "Get the `access` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "access")] + pub fn get_access(this: &GpuStorageTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureAccess")] + #[doc = "Change the `access` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "access")] - fn access_shim(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); + pub fn set_access(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuStorageTextureBindingLayout) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); + pub fn set_format(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "viewDimension")] + pub fn get_view_dimension( + this: &GpuStorageTextureBindingLayout, + ) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Change the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewDimension")] - fn view_dimension_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); + pub fn set_view_dimension(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); } #[cfg(web_sys_unstable_apis)] impl GpuStorageTextureBindingLayout { @@ -41,38 +94,23 @@ impl GpuStorageTextureBindingLayout { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuStorageTextureAccess")] - #[doc = "Change the `access` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_access()` instead."] pub fn access(&mut self, val: GpuStorageTextureAccess) -> &mut Self { - self.access_shim(val); + self.set_access(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] - #[doc = "Change the `viewDimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_dimension()` instead."] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.view_dimension_shim(val); + self.set_view_dimension(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs index ccd9bfc620c..1fd1ad710fb 100644 --- a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs @@ -14,14 +14,64 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `multisampled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "multisampled")] + pub fn get_multisampled(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `multisampled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "multisampled")] - fn multisampled_shim(this: &GpuTextureBindingLayout, val: bool); + pub fn set_multisampled(this: &GpuTextureBindingLayout, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureSampleType")] + #[doc = "Get the `sampleType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleType")] + pub fn get_sample_type(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureSampleType")] + #[doc = "Change the `sampleType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sampleType")] - fn sample_type_shim(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); + pub fn set_sample_type(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "viewDimension")] + pub fn get_view_dimension(this: &GpuTextureBindingLayout) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Change the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "viewDimension")] - fn view_dimension_shim(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); + pub fn set_view_dimension(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); } #[cfg(web_sys_unstable_apis)] impl GpuTextureBindingLayout { @@ -37,38 +87,23 @@ impl GpuTextureBindingLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `multisampled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_multisampled()` instead."] pub fn multisampled(&mut self, val: bool) -> &mut Self { - self.multisampled_shim(val); + self.set_multisampled(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureSampleType")] - #[doc = "Change the `sampleType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sample_type()` instead."] pub fn sample_type(&mut self, val: GpuTextureSampleType) -> &mut Self { - self.sample_type_shim(val); + self.set_sample_type(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] - #[doc = "Change the `viewDimension` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_view_dimension()` instead."] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.view_dimension_shim(val); + self.set_view_dimension(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs index b79eccc02d3..ff3a096540f 100644 --- a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs @@ -14,42 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuTextureDescriptor, val: &str); - #[cfg(feature = "GpuTextureDimension")] - #[wasm_bindgen(method, setter = "dimension")] - fn dimension_shim(this: &GpuTextureDescriptor, val: GpuTextureDimension); - #[cfg(feature = "GpuTextureFormat")] - #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuTextureDescriptor, val: GpuTextureFormat); - #[wasm_bindgen(method, setter = "mipLevelCount")] - fn mip_level_count_shim(this: &GpuTextureDescriptor, val: u32); - #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuTextureDescriptor, val: u32); - #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuTextureDescriptor, val: u32); - #[wasm_bindgen(method, setter = "viewFormats")] - fn view_formats_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl GpuTextureDescriptor { - #[cfg(feature = "GpuTextureFormat")] - #[doc = "Construct a new `GpuTextureDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(format: GpuTextureFormat, size: &::wasm_bindgen::JsValue, usage: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); - ret.size(size); - ret.usage(usage); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuTextureDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -57,10 +30,18 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuTextureDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureDimension")] + #[doc = "Get the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dimension")] + pub fn get_dimension(this: &GpuTextureDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureDimension")] #[doc = "Change the `dimension` field of this object."] @@ -69,10 +50,18 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn dimension(&mut self, val: GpuTextureDimension) -> &mut Self { - self.dimension_shim(val); - self - } + #[wasm_bindgen(method, setter = "dimension")] + pub fn set_dimension(this: &GpuTextureDescriptor, val: GpuTextureDimension); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuTextureDescriptor) -> GpuTextureFormat; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Change the `format` field of this object."] @@ -81,10 +70,17 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); - self - } + #[wasm_bindgen(method, setter = "format")] + pub fn set_format(this: &GpuTextureDescriptor, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mipLevelCount")] + pub fn get_mip_level_count(this: &GpuTextureDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mipLevelCount` field of this object."] #[doc = ""] @@ -92,10 +88,17 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mip_level_count(&mut self, val: u32) -> &mut Self { - self.mip_level_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "mipLevelCount")] + pub fn set_mip_level_count(this: &GpuTextureDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleCount")] + pub fn get_sample_count(this: &GpuTextureDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `sampleCount` field of this object."] #[doc = ""] @@ -103,10 +106,17 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "sampleCount")] + pub fn set_sample_count(this: &GpuTextureDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &GpuTextureDescriptor) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `size` field of this object."] #[doc = ""] @@ -114,10 +124,17 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn size(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.size_shim(val); - self - } + #[wasm_bindgen(method, setter = "size")] + pub fn set_size(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &GpuTextureDescriptor) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usage` field of this object."] #[doc = ""] @@ -125,10 +142,17 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); - self - } + #[wasm_bindgen(method, setter = "usage")] + pub fn set_usage(this: &GpuTextureDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "viewFormats")] + pub fn get_view_formats(this: &GpuTextureDescriptor) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `viewFormats` field of this object."] #[doc = ""] @@ -136,8 +160,74 @@ impl GpuTextureDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "viewFormats")] + pub fn set_view_formats(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl GpuTextureDescriptor { + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Construct a new `GpuTextureDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(format: GpuTextureFormat, size: &::wasm_bindgen::JsValue, usage: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.format(format); + ret.size(size); + ret.usage(usage); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureDimension")] + #[deprecated = "Use `set_dimension()` instead."] + pub fn dimension(&mut self, val: GpuTextureDimension) -> &mut Self { + self.set_dimension(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[deprecated = "Use `set_format()` instead."] + pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { + self.set_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mip_level_count()` instead."] + pub fn mip_level_count(&mut self, val: u32) -> &mut Self { + self.set_mip_level_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_sample_count()` instead."] + pub fn sample_count(&mut self, val: u32) -> &mut Self { + self.set_sample_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_size()` instead."] + pub fn size(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_size(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage()` instead."] + pub fn usage(&mut self, val: u32) -> &mut Self { + self.set_usage(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_view_formats()` instead."] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.view_formats_shim(val); + self.set_view_formats(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs index e6b85aacd3f..2a2b4014f45 100644 --- a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs @@ -14,39 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureViewDescriptor; - #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuTextureViewDescriptor, val: &str); - #[wasm_bindgen(method, setter = "arrayLayerCount")] - fn array_layer_count_shim(this: &GpuTextureViewDescriptor, val: u32); - #[cfg(feature = "GpuTextureAspect")] - #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); - #[wasm_bindgen(method, setter = "baseArrayLayer")] - fn base_array_layer_shim(this: &GpuTextureViewDescriptor, val: u32); - #[wasm_bindgen(method, setter = "baseMipLevel")] - fn base_mip_level_shim(this: &GpuTextureViewDescriptor, val: u32); - #[cfg(feature = "GpuTextureViewDimension")] - #[wasm_bindgen(method, setter = "dimension")] - fn dimension_shim(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); - #[cfg(feature = "GpuTextureFormat")] - #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); - #[wasm_bindgen(method, setter = "mipLevelCount")] - fn mip_level_count_shim(this: &GpuTextureViewDescriptor, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl GpuTextureViewDescriptor { - #[doc = "Construct a new `GpuTextureViewDescriptor`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `label` field of this object."] #[doc = ""] @@ -54,10 +30,17 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); - self - } + #[wasm_bindgen(method, setter = "label")] + pub fn set_label(this: &GpuTextureViewDescriptor, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `arrayLayerCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "arrayLayerCount")] + pub fn get_array_layer_count(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `arrayLayerCount` field of this object."] #[doc = ""] @@ -65,10 +48,18 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn array_layer_count(&mut self, val: u32) -> &mut Self { - self.array_layer_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "arrayLayerCount")] + pub fn set_array_layer_count(this: &GpuTextureViewDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[doc = "Get the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureAspect`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "aspect")] + pub fn get_aspect(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureAspect")] #[doc = "Change the `aspect` field of this object."] @@ -77,10 +68,17 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); - self - } + #[wasm_bindgen(method, setter = "aspect")] + pub fn set_aspect(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baseArrayLayer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "baseArrayLayer")] + pub fn get_base_array_layer(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `baseArrayLayer` field of this object."] #[doc = ""] @@ -88,10 +86,17 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn base_array_layer(&mut self, val: u32) -> &mut Self { - self.base_array_layer_shim(val); - self - } + #[wasm_bindgen(method, setter = "baseArrayLayer")] + pub fn set_base_array_layer(this: &GpuTextureViewDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baseMipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "baseMipLevel")] + pub fn get_base_mip_level(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `baseMipLevel` field of this object."] #[doc = ""] @@ -99,10 +104,18 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn base_mip_level(&mut self, val: u32) -> &mut Self { - self.base_mip_level_shim(val); - self - } + #[wasm_bindgen(method, setter = "baseMipLevel")] + pub fn set_base_mip_level(this: &GpuTextureViewDescriptor, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dimension")] + pub fn get_dimension(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureViewDimension")] #[doc = "Change the `dimension` field of this object."] @@ -111,10 +124,18 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.dimension_shim(val); - self - } + #[wasm_bindgen(method, setter = "dimension")] + pub fn set_dimension(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureFormat`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuTextureFormat")] #[doc = "Change the `format` field of this object."] @@ -123,10 +144,17 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); - self - } + #[wasm_bindgen(method, setter = "format")] + pub fn set_format(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mipLevelCount")] + pub fn get_mip_level_count(this: &GpuTextureViewDescriptor) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mipLevelCount` field of this object."] #[doc = ""] @@ -134,8 +162,71 @@ impl GpuTextureViewDescriptor { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "mipLevelCount")] + pub fn set_mip_level_count(this: &GpuTextureViewDescriptor, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl GpuTextureViewDescriptor { + #[doc = "Construct a new `GpuTextureViewDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_label()` instead."] + pub fn label(&mut self, val: &str) -> &mut Self { + self.set_label(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_array_layer_count()` instead."] + pub fn array_layer_count(&mut self, val: u32) -> &mut Self { + self.set_array_layer_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[deprecated = "Use `set_aspect()` instead."] + pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { + self.set_aspect(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_base_array_layer()` instead."] + pub fn base_array_layer(&mut self, val: u32) -> &mut Self { + self.set_base_array_layer(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_base_mip_level()` instead."] + pub fn base_mip_level(&mut self, val: u32) -> &mut Self { + self.set_base_mip_level(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[deprecated = "Use `set_dimension()` instead."] + pub fn dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { + self.set_dimension(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[deprecated = "Use `set_format()` instead."] + pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { + self.set_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mip_level_count()` instead."] pub fn mip_level_count(&mut self, val: u32) -> &mut Self { - self.mip_level_count_shim(val); + self.set_mip_level_count(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs index 276f6d2ddd5..ad6aeef6943 100644 --- a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuUncapturedErrorEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_bubbles(this: &GpuUncapturedErrorEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_cancelable(this: &GpuUncapturedErrorEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GpuUncapturedErrorEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GpuUncapturedErrorEventInit, val: bool); + pub fn set_composed(this: &GpuUncapturedErrorEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuError")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &GpuUncapturedErrorEventInit) -> GpuError; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuError")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &GpuUncapturedErrorEventInit, val: &GpuError); + pub fn set_error(this: &GpuUncapturedErrorEventInit, val: &GpuError); } #[cfg(web_sys_unstable_apis)] impl GpuUncapturedErrorEventInit { @@ -40,48 +105,28 @@ impl GpuUncapturedErrorEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuError")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &GpuError) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs index 630b6daa18f..b2dba6dc8c4 100644 --- a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs +++ b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexAttribute; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &GpuVertexAttribute) -> GpuVertexFormat; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexFormat")] + #[doc = "Change the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuVertexAttribute, val: GpuVertexFormat); + pub fn set_format(this: &GpuVertexAttribute, val: GpuVertexFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &GpuVertexAttribute) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuVertexAttribute, val: f64); + pub fn set_offset(this: &GpuVertexAttribute, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `shaderLocation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "shaderLocation")] + pub fn get_shader_location(this: &GpuVertexAttribute) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `shaderLocation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "shaderLocation")] - fn shader_location_shim(this: &GpuVertexAttribute, val: u32); + pub fn set_shader_location(this: &GpuVertexAttribute, val: u32); } #[cfg(web_sys_unstable_apis)] impl GpuVertexAttribute { @@ -41,36 +90,21 @@ impl GpuVertexAttribute { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexFormat")] - #[doc = "Change the `format` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuVertexFormat) -> &mut Self { - self.format_shim(val); + self.set_format(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `shaderLocation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_shader_location()` instead."] pub fn shader_location(&mut self, val: u32) -> &mut Self { - self.shader_location_shim(val); + self.set_shader_location(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs index 21594f7bab8..267152e982c 100644 --- a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs +++ b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexBufferLayout; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `arrayStride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "arrayStride")] + pub fn get_array_stride(this: &GpuVertexBufferLayout) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `arrayStride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "arrayStride")] - fn array_stride_shim(this: &GpuVertexBufferLayout, val: f64); + pub fn set_array_stride(this: &GpuVertexBufferLayout, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "attributes")] + pub fn get_attributes(this: &GpuVertexBufferLayout) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + pub fn set_attributes(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexStepMode")] + #[doc = "Get the `stepMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stepMode")] + pub fn get_step_mode(this: &GpuVertexBufferLayout) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexStepMode")] + #[doc = "Change the `stepMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stepMode")] - fn step_mode_shim(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); + pub fn set_step_mode(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); } #[cfg(web_sys_unstable_apis)] impl GpuVertexBufferLayout { @@ -38,37 +87,22 @@ impl GpuVertexBufferLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `arrayStride` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_array_stride()` instead."] pub fn array_stride(&mut self, val: f64) -> &mut Self { - self.array_stride_shim(val); + self.set_array_stride(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attributes_shim(val); + self.set_attributes(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuVertexStepMode")] - #[doc = "Change the `stepMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_step_mode()` instead."] pub fn step_mode(&mut self, val: GpuVertexStepMode) -> &mut Self { - self.step_mode_shim(val); + self.set_step_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexState.rs b/crates/web-sys/src/features/gen_GpuVertexState.rs index 6b841d11fdf..29bc317bd66 100644 --- a/crates/web-sys/src/features/gen_GpuVertexState.rs +++ b/crates/web-sys/src/features/gen_GpuVertexState.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexState; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "entryPoint")] + pub fn get_entry_point(this: &GpuVertexState) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuVertexState, val: &str); + pub fn set_entry_point(this: &GpuVertexState, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "module")] + pub fn get_module(this: &GpuVertexState) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Change the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuVertexState, val: &GpuShaderModule); + pub fn set_module(this: &GpuVertexState, val: &GpuShaderModule); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `buffers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "buffers")] + pub fn get_buffers(this: &GpuVertexState) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `buffers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "buffers")] - fn buffers_shim(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); + pub fn set_buffers(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl GpuVertexState { @@ -38,37 +87,22 @@ impl GpuVertexState { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `entryPoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_entry_point()` instead."] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "GpuShaderModule")] - #[doc = "Change the `module` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_module()` instead."] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `buffers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_buffers()` instead."] pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.buffers_shim(val); + self.set_buffers(val); self } } diff --git a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs index 73528f6bc37..42286df8af1 100644 --- a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs +++ b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] pub type GroupedHistoryEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GroupedHistoryEventInit, val: bool); + pub fn set_bubbles(this: &GroupedHistoryEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GroupedHistoryEventInit, val: bool); + pub fn set_cancelable(this: &GroupedHistoryEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &GroupedHistoryEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GroupedHistoryEventInit, val: bool); + pub fn set_composed(this: &GroupedHistoryEventInit, val: bool); #[cfg(feature = "Element")] + #[doc = "Get the `otherBrowser` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] + #[wasm_bindgen(method, getter = "otherBrowser")] + pub fn get_other_browser(this: &GroupedHistoryEventInit) -> Option; + #[cfg(feature = "Element")] + #[doc = "Change the `otherBrowser` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] #[wasm_bindgen(method, setter = "otherBrowser")] - fn other_browser_shim(this: &GroupedHistoryEventInit, val: Option<&Element>); + pub fn set_other_browser(this: &GroupedHistoryEventInit, val: Option<&Element>); } impl GroupedHistoryEventInit { #[doc = "Construct a new `GroupedHistoryEventInit`."] @@ -29,33 +62,25 @@ impl GroupedHistoryEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Element")] - #[doc = "Change the `otherBrowser` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] + #[deprecated = "Use `set_other_browser()` instead."] pub fn other_browser(&mut self, val: Option<&Element>) -> &mut Self { - self.other_browser_shim(val); + self.set_other_browser(val); self } } diff --git a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs index 56caf74fac2..bd9cdb24c04 100644 --- a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs +++ b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] pub type HalfOpenInfoDict; + #[doc = "Get the `speculative` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] + #[wasm_bindgen(method, getter = "speculative")] + pub fn get_speculative(this: &HalfOpenInfoDict) -> Option; + #[doc = "Change the `speculative` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] #[wasm_bindgen(method, setter = "speculative")] - fn speculative_shim(this: &HalfOpenInfoDict, val: bool); + pub fn set_speculative(this: &HalfOpenInfoDict, val: bool); } impl HalfOpenInfoDict { #[doc = "Construct a new `HalfOpenInfoDict`."] @@ -22,11 +30,9 @@ impl HalfOpenInfoDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `speculative` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] + #[deprecated = "Use `set_speculative()` instead."] pub fn speculative(&mut self, val: bool) -> &mut Self { - self.speculative_shim(val); + self.set_speculative(val); self } } diff --git a/crates/web-sys/src/features/gen_HashChangeEventInit.rs b/crates/web-sys/src/features/gen_HashChangeEventInit.rs index 784fbfc5dee..a4b951d4c92 100644 --- a/crates/web-sys/src/features/gen_HashChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_HashChangeEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub type HashChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HashChangeEventInit, val: bool); + pub fn set_bubbles(this: &HashChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HashChangeEventInit, val: bool); + pub fn set_cancelable(this: &HashChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HashChangeEventInit, val: bool); + pub fn set_composed(this: &HashChangeEventInit, val: bool); + #[doc = "Get the `newURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[wasm_bindgen(method, getter = "newURL")] + pub fn get_new_url(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `newURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "newURL")] - fn new_url_shim(this: &HashChangeEventInit, val: &str); + pub fn set_new_url(this: &HashChangeEventInit, val: &str); + #[doc = "Get the `oldURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[wasm_bindgen(method, getter = "oldURL")] + pub fn get_old_url(this: &HashChangeEventInit) -> Option; + #[doc = "Change the `oldURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldURL")] - fn old_url_shim(this: &HashChangeEventInit, val: &str); + pub fn set_old_url(this: &HashChangeEventInit, val: &str); } impl HashChangeEventInit { #[doc = "Construct a new `HashChangeEventInit`."] @@ -30,39 +70,29 @@ impl HashChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `newURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_new_url()` instead."] pub fn new_url(&mut self, val: &str) -> &mut Self { - self.new_url_shim(val); + self.set_new_url(val); self } - #[doc = "Change the `oldURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + #[deprecated = "Use `set_old_url()` instead."] pub fn old_url(&mut self, val: &str) -> &mut Self { - self.old_url_shim(val); + self.set_old_url(val); self } } diff --git a/crates/web-sys/src/features/gen_HidCollectionInfo.rs b/crates/web-sys/src/features/gen_HidCollectionInfo.rs index 6a99d71e18c..e151d69409d 100644 --- a/crates/web-sys/src/features/gen_HidCollectionInfo.rs +++ b/crates/web-sys/src/features/gen_HidCollectionInfo.rs @@ -14,34 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidCollectionInfo; - #[wasm_bindgen(method, setter = "children")] - fn children_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "featureReports")] - fn feature_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "inputReports")] - fn input_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "outputReports")] - fn output_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &HidCollectionInfo, val: u8); - #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &HidCollectionInfo, val: u16); - #[wasm_bindgen(method, setter = "usagePage")] - fn usage_page_shim(this: &HidCollectionInfo, val: u16); -} -#[cfg(web_sys_unstable_apis)] -impl HidCollectionInfo { - #[doc = "Construct a new `HidCollectionInfo`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `children` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "children")] + pub fn get_children(this: &HidCollectionInfo) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `children` field of this object."] #[doc = ""] @@ -49,10 +30,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn children(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.children_shim(val); - self - } + #[wasm_bindgen(method, setter = "children")] + pub fn set_children(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `featureReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "featureReports")] + pub fn get_feature_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `featureReports` field of this object."] #[doc = ""] @@ -60,10 +48,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn feature_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feature_reports_shim(val); - self - } + #[wasm_bindgen(method, setter = "featureReports")] + pub fn set_feature_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `inputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "inputReports")] + pub fn get_input_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `inputReports` field of this object."] #[doc = ""] @@ -71,10 +66,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn input_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.input_reports_shim(val); - self - } + #[wasm_bindgen(method, setter = "inputReports")] + pub fn set_input_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `outputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "outputReports")] + pub fn get_output_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `outputReports` field of this object."] #[doc = ""] @@ -82,10 +84,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn output_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.output_reports_shim(val); - self - } + #[wasm_bindgen(method, setter = "outputReports")] + pub fn set_output_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &HidCollectionInfo) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `type` field of this object."] #[doc = ""] @@ -93,10 +102,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn type_(&mut self, val: u8) -> &mut Self { - self.type__shim(val); - self - } + #[wasm_bindgen(method, setter = "type")] + pub fn set_type(this: &HidCollectionInfo, val: u8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &HidCollectionInfo) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usage` field of this object."] #[doc = ""] @@ -104,10 +120,17 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage(&mut self, val: u16) -> &mut Self { - self.usage_shim(val); - self - } + #[wasm_bindgen(method, setter = "usage")] + pub fn set_usage(this: &HidCollectionInfo, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usagePage")] + pub fn get_usage_page(this: &HidCollectionInfo) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usagePage` field of this object."] #[doc = ""] @@ -115,8 +138,62 @@ impl HidCollectionInfo { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "usagePage")] + pub fn set_usage_page(this: &HidCollectionInfo, val: u16); +} +#[cfg(web_sys_unstable_apis)] +impl HidCollectionInfo { + #[doc = "Construct a new `HidCollectionInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_children()` instead."] + pub fn children(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_children(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_feature_reports()` instead."] + pub fn feature_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_feature_reports(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_input_reports()` instead."] + pub fn input_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_input_reports(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_output_reports()` instead."] + pub fn output_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_output_reports(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_type()` instead."] + pub fn type_(&mut self, val: u8) -> &mut Self { + self.set_type(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage()` instead."] + pub fn usage(&mut self, val: u16) -> &mut Self { + self.set_usage(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage_page()` instead."] pub fn usage_page(&mut self, val: u16) -> &mut Self { - self.usage_page_shim(val); + self.set_usage_page(val); self } } diff --git a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs index 29201bb43b2..3faf25b8854 100644 --- a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidConnectionEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HidConnectionEventInit, val: bool); + pub fn set_bubbles(this: &HidConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HidConnectionEventInit, val: bool); + pub fn set_cancelable(this: &HidConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &HidConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HidConnectionEventInit, val: bool); + pub fn set_composed(this: &HidConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "device")] + pub fn get_device(this: &HidConnectionEventInit) -> HidDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &HidConnectionEventInit, val: &HidDevice); + pub fn set_device(this: &HidConnectionEventInit, val: &HidDevice); } #[cfg(web_sys_unstable_apis)] impl HidConnectionEventInit { @@ -40,48 +105,28 @@ impl HidConnectionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &HidDevice) -> &mut Self { - self.device_shim(val); + self.set_device(val); self } } diff --git a/crates/web-sys/src/features/gen_HidDeviceFilter.rs b/crates/web-sys/src/features/gen_HidDeviceFilter.rs index 88c21dbc771..d7fd6c7e389 100644 --- a/crates/web-sys/src/features/gen_HidDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_HidDeviceFilter.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidDeviceFilter; - #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &HidDeviceFilter, val: u16); - #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &HidDeviceFilter, val: u16); - #[wasm_bindgen(method, setter = "usagePage")] - fn usage_page_shim(this: &HidDeviceFilter, val: u16); - #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &HidDeviceFilter, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl HidDeviceFilter { - #[doc = "Construct a new `HidDeviceFilter`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "productId")] + pub fn get_product_id(this: &HidDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `productId` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl HidDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn product_id(&mut self, val: u16) -> &mut Self { - self.product_id_shim(val); - self - } + #[wasm_bindgen(method, setter = "productId")] + pub fn set_product_id(this: &HidDeviceFilter, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &HidDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usage` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl HidDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage(&mut self, val: u16) -> &mut Self { - self.usage_shim(val); - self - } + #[wasm_bindgen(method, setter = "usage")] + pub fn set_usage(this: &HidDeviceFilter, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usagePage")] + pub fn get_usage_page(this: &HidDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usagePage` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl HidDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage_page(&mut self, val: u16) -> &mut Self { - self.usage_page_shim(val); - self - } + #[wasm_bindgen(method, setter = "usagePage")] + pub fn set_usage_page(this: &HidDeviceFilter, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "vendorId")] + pub fn get_vendor_id(this: &HidDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `vendorId` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl HidDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "vendorId")] + pub fn set_vendor_id(this: &HidDeviceFilter, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl HidDeviceFilter { + #[doc = "Construct a new `HidDeviceFilter`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_product_id()` instead."] + pub fn product_id(&mut self, val: u16) -> &mut Self { + self.set_product_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage()` instead."] + pub fn usage(&mut self, val: u16) -> &mut Self { + self.set_usage(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage_page()` instead."] + pub fn usage_page(&mut self, val: u16) -> &mut Self { + self.set_usage_page(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u32) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id(val); self } } diff --git a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs index ad2ec1f3758..81faf1780ef 100644 --- a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidDeviceRequestOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &HidDeviceRequestOptions) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl HidDeviceRequestOptions { @@ -32,14 +48,9 @@ impl HidDeviceRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters(val); self } } diff --git a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs index 6defeeec352..b13704deac9 100644 --- a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs +++ b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs @@ -14,37 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidInputReportEventInit; - #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HidInputReportEventInit, val: bool); - #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HidInputReportEventInit, val: bool); - #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HidInputReportEventInit, val: bool); - #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &HidInputReportEventInit, val: &::js_sys::DataView); - #[cfg(feature = "HidDevice")] - #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &HidInputReportEventInit, val: &HidDevice); - #[wasm_bindgen(method, setter = "reportId")] - fn report_id_shim(this: &HidInputReportEventInit, val: u8); -} -#[cfg(web_sys_unstable_apis)] -impl HidInputReportEventInit { - #[cfg(feature = "HidDevice")] - #[doc = "Construct a new `HidInputReportEventInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(data: &::js_sys::DataView, device: &HidDevice, report_id: u8) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.device(device); - ret.report_id(report_id); - ret - } + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &HidInputReportEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] @@ -52,10 +30,17 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); - self - } + #[wasm_bindgen(method, setter = "bubbles")] + pub fn set_bubbles(this: &HidInputReportEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &HidInputReportEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] @@ -63,10 +48,17 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); - self - } + #[wasm_bindgen(method, setter = "cancelable")] + pub fn set_cancelable(this: &HidInputReportEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &HidInputReportEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] @@ -74,10 +66,17 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); - self - } + #[wasm_bindgen(method, setter = "composed")] + pub fn set_composed(this: &HidInputReportEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &HidInputReportEventInit) -> ::js_sys::DataView; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `data` field of this object."] #[doc = ""] @@ -85,10 +84,18 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn data(&mut self, val: &::js_sys::DataView) -> &mut Self { - self.data_shim(val); - self - } + #[wasm_bindgen(method, setter = "data")] + pub fn set_data(this: &HidInputReportEventInit, val: &::js_sys::DataView); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "device")] + pub fn get_device(this: &HidInputReportEventInit) -> HidDevice; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidDevice")] #[doc = "Change the `device` field of this object."] @@ -97,10 +104,17 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn device(&mut self, val: &HidDevice) -> &mut Self { - self.device_shim(val); - self - } + #[wasm_bindgen(method, setter = "device")] + pub fn set_device(this: &HidInputReportEventInit, val: &HidDevice); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reportId")] + pub fn get_report_id(this: &HidInputReportEventInit) -> u8; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `reportId` field of this object."] #[doc = ""] @@ -108,8 +122,61 @@ impl HidInputReportEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "reportId")] + pub fn set_report_id(this: &HidInputReportEventInit, val: u8); +} +#[cfg(web_sys_unstable_apis)] +impl HidInputReportEventInit { + #[cfg(feature = "HidDevice")] + #[doc = "Construct a new `HidInputReportEventInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(data: &::js_sys::DataView, device: &HidDevice, report_id: u8) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.data(data); + ret.device(device); + ret.report_id(report_id); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bubbles()` instead."] + pub fn bubbles(&mut self, val: bool) -> &mut Self { + self.set_bubbles(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_cancelable()` instead."] + pub fn cancelable(&mut self, val: bool) -> &mut Self { + self.set_cancelable(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_composed()` instead."] + pub fn composed(&mut self, val: bool) -> &mut Self { + self.set_composed(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_data()` instead."] + pub fn data(&mut self, val: &::js_sys::DataView) -> &mut Self { + self.set_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + #[deprecated = "Use `set_device()` instead."] + pub fn device(&mut self, val: &HidDevice) -> &mut Self { + self.set_device(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_report_id()` instead."] pub fn report_id(&mut self, val: u8) -> &mut Self { - self.report_id_shim(val); + self.set_report_id(val); self } } diff --git a/crates/web-sys/src/features/gen_HidReportInfo.rs b/crates/web-sys/src/features/gen_HidReportInfo.rs index 9ed35faa805..4da0d00dbcc 100644 --- a/crates/web-sys/src/features/gen_HidReportInfo.rs +++ b/crates/web-sys/src/features/gen_HidReportInfo.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidReportInfo; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `items` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "items")] + pub fn get_items(this: &HidReportInfo) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `items` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "items")] - fn items_shim(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); + pub fn set_items(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reportId")] + pub fn get_report_id(this: &HidReportInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reportId")] - fn report_id_shim(this: &HidReportInfo, val: u8); + pub fn set_report_id(this: &HidReportInfo, val: u8); } #[cfg(web_sys_unstable_apis)] impl HidReportInfo { @@ -33,25 +65,15 @@ impl HidReportInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `items` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_items()` instead."] pub fn items(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.items_shim(val); + self.set_items(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_report_id()` instead."] pub fn report_id(&mut self, val: u8) -> &mut Self { - self.report_id_shim(val); + self.set_report_id(val); self } } diff --git a/crates/web-sys/src/features/gen_HidReportItem.rs b/crates/web-sys/src/features/gen_HidReportItem.rs index c4d98dd12fb..c483ecd5598 100644 --- a/crates/web-sys/src/features/gen_HidReportItem.rs +++ b/crates/web-sys/src/features/gen_HidReportItem.rs @@ -14,77 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidReportItem; - #[wasm_bindgen(method, setter = "hasNull")] - fn has_null_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "hasPreferredState")] - fn has_preferred_state_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isAbsolute")] - fn is_absolute_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isArray")] - fn is_array_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isBufferedBytes")] - fn is_buffered_bytes_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isConstant")] - fn is_constant_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isLinear")] - fn is_linear_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isRange")] - fn is_range_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "isVolatile")] - fn is_volatile_shim(this: &HidReportItem, val: bool); - #[wasm_bindgen(method, setter = "logicalMaximum")] - fn logical_maximum_shim(this: &HidReportItem, val: i32); - #[wasm_bindgen(method, setter = "logicalMinimum")] - fn logical_minimum_shim(this: &HidReportItem, val: i32); - #[wasm_bindgen(method, setter = "physicalMaximum")] - fn physical_maximum_shim(this: &HidReportItem, val: i32); - #[wasm_bindgen(method, setter = "physicalMinimum")] - fn physical_minimum_shim(this: &HidReportItem, val: i32); - #[wasm_bindgen(method, setter = "reportCount")] - fn report_count_shim(this: &HidReportItem, val: u16); - #[wasm_bindgen(method, setter = "reportSize")] - fn report_size_shim(this: &HidReportItem, val: u16); - #[wasm_bindgen(method, setter = "strings")] - fn strings_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "unitExponent")] - fn unit_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorCurrentExponent")] - fn unit_factor_current_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorLengthExponent")] - fn unit_factor_length_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorLuminousIntensityExponent")] - fn unit_factor_luminous_intensity_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorMassExponent")] - fn unit_factor_mass_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorTemperatureExponent")] - fn unit_factor_temperature_exponent_shim(this: &HidReportItem, val: i8); - #[wasm_bindgen(method, setter = "unitFactorTimeExponent")] - fn unit_factor_time_exponent_shim(this: &HidReportItem, val: i8); - #[cfg(feature = "HidUnitSystem")] - #[wasm_bindgen(method, setter = "unitSystem")] - fn unit_system_shim(this: &HidReportItem, val: HidUnitSystem); - #[wasm_bindgen(method, setter = "usageMaximum")] - fn usage_maximum_shim(this: &HidReportItem, val: u32); - #[wasm_bindgen(method, setter = "usageMinimum")] - fn usage_minimum_shim(this: &HidReportItem, val: u32); - #[wasm_bindgen(method, setter = "usages")] - fn usages_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "wrap")] - fn wrap_shim(this: &HidReportItem, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl HidReportItem { - #[doc = "Construct a new `HidReportItem`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasNull` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "hasNull")] + pub fn get_has_null(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `hasNull` field of this object."] #[doc = ""] @@ -92,10 +30,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn has_null(&mut self, val: bool) -> &mut Self { - self.has_null_shim(val); - self - } + #[wasm_bindgen(method, setter = "hasNull")] + pub fn set_has_null(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasPreferredState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "hasPreferredState")] + pub fn get_has_preferred_state(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `hasPreferredState` field of this object."] #[doc = ""] @@ -103,10 +48,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn has_preferred_state(&mut self, val: bool) -> &mut Self { - self.has_preferred_state_shim(val); - self - } + #[wasm_bindgen(method, setter = "hasPreferredState")] + pub fn set_has_preferred_state(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isAbsolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isAbsolute")] + pub fn get_is_absolute(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isAbsolute` field of this object."] #[doc = ""] @@ -114,10 +66,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_absolute(&mut self, val: bool) -> &mut Self { - self.is_absolute_shim(val); - self - } + #[wasm_bindgen(method, setter = "isAbsolute")] + pub fn set_is_absolute(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isArray` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isArray")] + pub fn get_is_array(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isArray` field of this object."] #[doc = ""] @@ -125,10 +84,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_array(&mut self, val: bool) -> &mut Self { - self.is_array_shim(val); - self - } + #[wasm_bindgen(method, setter = "isArray")] + pub fn set_is_array(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isBufferedBytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isBufferedBytes")] + pub fn get_is_buffered_bytes(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isBufferedBytes` field of this object."] #[doc = ""] @@ -136,10 +102,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_buffered_bytes(&mut self, val: bool) -> &mut Self { - self.is_buffered_bytes_shim(val); - self - } + #[wasm_bindgen(method, setter = "isBufferedBytes")] + pub fn set_is_buffered_bytes(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isConstant")] + pub fn get_is_constant(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isConstant` field of this object."] #[doc = ""] @@ -147,10 +120,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_constant(&mut self, val: bool) -> &mut Self { - self.is_constant_shim(val); - self - } + #[wasm_bindgen(method, setter = "isConstant")] + pub fn set_is_constant(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isLinear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isLinear")] + pub fn get_is_linear(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isLinear` field of this object."] #[doc = ""] @@ -158,10 +138,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_linear(&mut self, val: bool) -> &mut Self { - self.is_linear_shim(val); - self - } + #[wasm_bindgen(method, setter = "isLinear")] + pub fn set_is_linear(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isRange")] + pub fn get_is_range(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isRange` field of this object."] #[doc = ""] @@ -169,10 +156,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_range(&mut self, val: bool) -> &mut Self { - self.is_range_shim(val); - self - } + #[wasm_bindgen(method, setter = "isRange")] + pub fn set_is_range(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isVolatile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "isVolatile")] + pub fn get_is_volatile(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `isVolatile` field of this object."] #[doc = ""] @@ -180,10 +174,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn is_volatile(&mut self, val: bool) -> &mut Self { - self.is_volatile_shim(val); - self - } + #[wasm_bindgen(method, setter = "isVolatile")] + pub fn set_is_volatile(this: &HidReportItem, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `logicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "logicalMaximum")] + pub fn get_logical_maximum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `logicalMaximum` field of this object."] #[doc = ""] @@ -191,10 +192,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn logical_maximum(&mut self, val: i32) -> &mut Self { - self.logical_maximum_shim(val); - self - } + #[wasm_bindgen(method, setter = "logicalMaximum")] + pub fn set_logical_maximum(this: &HidReportItem, val: i32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `logicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "logicalMinimum")] + pub fn get_logical_minimum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `logicalMinimum` field of this object."] #[doc = ""] @@ -202,10 +210,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn logical_minimum(&mut self, val: i32) -> &mut Self { - self.logical_minimum_shim(val); - self - } + #[wasm_bindgen(method, setter = "logicalMinimum")] + pub fn set_logical_minimum(this: &HidReportItem, val: i32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `physicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "physicalMaximum")] + pub fn get_physical_maximum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `physicalMaximum` field of this object."] #[doc = ""] @@ -213,10 +228,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn physical_maximum(&mut self, val: i32) -> &mut Self { - self.physical_maximum_shim(val); - self - } + #[wasm_bindgen(method, setter = "physicalMaximum")] + pub fn set_physical_maximum(this: &HidReportItem, val: i32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `physicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "physicalMinimum")] + pub fn get_physical_minimum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `physicalMinimum` field of this object."] #[doc = ""] @@ -224,10 +246,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn physical_minimum(&mut self, val: i32) -> &mut Self { - self.physical_minimum_shim(val); - self - } + #[wasm_bindgen(method, setter = "physicalMinimum")] + pub fn set_physical_minimum(this: &HidReportItem, val: i32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reportCount")] + pub fn get_report_count(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `reportCount` field of this object."] #[doc = ""] @@ -235,10 +264,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn report_count(&mut self, val: u16) -> &mut Self { - self.report_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "reportCount")] + pub fn set_report_count(this: &HidReportItem, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reportSize")] + pub fn get_report_size(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `reportSize` field of this object."] #[doc = ""] @@ -246,10 +282,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn report_size(&mut self, val: u16) -> &mut Self { - self.report_size_shim(val); - self - } + #[wasm_bindgen(method, setter = "reportSize")] + pub fn set_report_size(this: &HidReportItem, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `strings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "strings")] + pub fn get_strings(this: &HidReportItem) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `strings` field of this object."] #[doc = ""] @@ -257,10 +300,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.strings_shim(val); - self - } + #[wasm_bindgen(method, setter = "strings")] + pub fn set_strings(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitExponent")] + pub fn get_unit_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitExponent` field of this object."] #[doc = ""] @@ -268,10 +318,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_exponent(&mut self, val: i8) -> &mut Self { - self.unit_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitExponent")] + pub fn set_unit_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorCurrentExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorCurrentExponent")] + pub fn get_unit_factor_current_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorCurrentExponent` field of this object."] #[doc = ""] @@ -279,10 +336,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_current_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_current_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorCurrentExponent")] + pub fn set_unit_factor_current_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorLengthExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorLengthExponent")] + pub fn get_unit_factor_length_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorLengthExponent` field of this object."] #[doc = ""] @@ -290,10 +354,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_length_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_length_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorLengthExponent")] + pub fn set_unit_factor_length_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorLuminousIntensityExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorLuminousIntensityExponent")] + pub fn get_unit_factor_luminous_intensity_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorLuminousIntensityExponent` field of this object."] #[doc = ""] @@ -301,10 +372,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_luminous_intensity_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorLuminousIntensityExponent")] + pub fn set_unit_factor_luminous_intensity_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorMassExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorMassExponent")] + pub fn get_unit_factor_mass_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorMassExponent` field of this object."] #[doc = ""] @@ -312,10 +390,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_mass_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorMassExponent")] + pub fn set_unit_factor_mass_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorTemperatureExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorTemperatureExponent")] + pub fn get_unit_factor_temperature_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorTemperatureExponent` field of this object."] #[doc = ""] @@ -323,10 +408,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_temperature_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorTemperatureExponent")] + pub fn set_unit_factor_temperature_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorTimeExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitFactorTimeExponent")] + pub fn get_unit_factor_time_exponent(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `unitFactorTimeExponent` field of this object."] #[doc = ""] @@ -334,10 +426,18 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_factor_time_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_time_exponent_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitFactorTimeExponent")] + pub fn set_unit_factor_time_exponent(this: &HidReportItem, val: i8); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidUnitSystem")] + #[doc = "Get the `unitSystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`, `HidUnitSystem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "unitSystem")] + pub fn get_unit_system(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HidUnitSystem")] #[doc = "Change the `unitSystem` field of this object."] @@ -346,10 +446,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn unit_system(&mut self, val: HidUnitSystem) -> &mut Self { - self.unit_system_shim(val); - self - } + #[wasm_bindgen(method, setter = "unitSystem")] + pub fn set_unit_system(this: &HidReportItem, val: HidUnitSystem); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usageMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usageMaximum")] + pub fn get_usage_maximum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usageMaximum` field of this object."] #[doc = ""] @@ -357,10 +464,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage_maximum(&mut self, val: u32) -> &mut Self { - self.usage_maximum_shim(val); - self - } + #[wasm_bindgen(method, setter = "usageMaximum")] + pub fn set_usage_maximum(this: &HidReportItem, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usageMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usageMinimum")] + pub fn get_usage_minimum(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usageMinimum` field of this object."] #[doc = ""] @@ -368,10 +482,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usage_minimum(&mut self, val: u32) -> &mut Self { - self.usage_minimum_shim(val); - self - } + #[wasm_bindgen(method, setter = "usageMinimum")] + pub fn set_usage_minimum(this: &HidReportItem, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usages` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usages")] + pub fn get_usages(this: &HidReportItem) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `usages` field of this object."] #[doc = ""] @@ -379,10 +500,17 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.usages_shim(val); - self - } + #[wasm_bindgen(method, setter = "usages")] + pub fn set_usages(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `wrap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "wrap")] + pub fn get_wrap(this: &HidReportItem) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `wrap` field of this object."] #[doc = ""] @@ -390,8 +518,189 @@ impl HidReportItem { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "wrap")] + pub fn set_wrap(this: &HidReportItem, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl HidReportItem { + #[doc = "Construct a new `HidReportItem`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_has_null()` instead."] + pub fn has_null(&mut self, val: bool) -> &mut Self { + self.set_has_null(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_has_preferred_state()` instead."] + pub fn has_preferred_state(&mut self, val: bool) -> &mut Self { + self.set_has_preferred_state(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_absolute()` instead."] + pub fn is_absolute(&mut self, val: bool) -> &mut Self { + self.set_is_absolute(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_array()` instead."] + pub fn is_array(&mut self, val: bool) -> &mut Self { + self.set_is_array(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_buffered_bytes()` instead."] + pub fn is_buffered_bytes(&mut self, val: bool) -> &mut Self { + self.set_is_buffered_bytes(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_constant()` instead."] + pub fn is_constant(&mut self, val: bool) -> &mut Self { + self.set_is_constant(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_linear()` instead."] + pub fn is_linear(&mut self, val: bool) -> &mut Self { + self.set_is_linear(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_range()` instead."] + pub fn is_range(&mut self, val: bool) -> &mut Self { + self.set_is_range(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_is_volatile()` instead."] + pub fn is_volatile(&mut self, val: bool) -> &mut Self { + self.set_is_volatile(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_logical_maximum()` instead."] + pub fn logical_maximum(&mut self, val: i32) -> &mut Self { + self.set_logical_maximum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_logical_minimum()` instead."] + pub fn logical_minimum(&mut self, val: i32) -> &mut Self { + self.set_logical_minimum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_physical_maximum()` instead."] + pub fn physical_maximum(&mut self, val: i32) -> &mut Self { + self.set_physical_maximum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_physical_minimum()` instead."] + pub fn physical_minimum(&mut self, val: i32) -> &mut Self { + self.set_physical_minimum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_report_count()` instead."] + pub fn report_count(&mut self, val: u16) -> &mut Self { + self.set_report_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_report_size()` instead."] + pub fn report_size(&mut self, val: u16) -> &mut Self { + self.set_report_size(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_strings()` instead."] + pub fn strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_strings(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_exponent()` instead."] + pub fn unit_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_current_exponent()` instead."] + pub fn unit_factor_current_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_current_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_length_exponent()` instead."] + pub fn unit_factor_length_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_length_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_luminous_intensity_exponent()` instead."] + pub fn unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_luminous_intensity_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_mass_exponent()` instead."] + pub fn unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_mass_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_temperature_exponent()` instead."] + pub fn unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_temperature_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_unit_factor_time_exponent()` instead."] + pub fn unit_factor_time_exponent(&mut self, val: i8) -> &mut Self { + self.set_unit_factor_time_exponent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidUnitSystem")] + #[deprecated = "Use `set_unit_system()` instead."] + pub fn unit_system(&mut self, val: HidUnitSystem) -> &mut Self { + self.set_unit_system(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage_maximum()` instead."] + pub fn usage_maximum(&mut self, val: u32) -> &mut Self { + self.set_usage_maximum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usage_minimum()` instead."] + pub fn usage_minimum(&mut self, val: u32) -> &mut Self { + self.set_usage_minimum(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_usages()` instead."] + pub fn usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_usages(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_wrap()` instead."] pub fn wrap(&mut self, val: bool) -> &mut Self { - self.wrap_shim(val); + self.set_wrap(val); self } } diff --git a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs index 1052c037a47..07fcd66658b 100644 --- a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs +++ b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] pub type HiddenPluginEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HiddenPluginEventInit, val: bool); + pub fn set_bubbles(this: &HiddenPluginEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HiddenPluginEventInit, val: bool); + pub fn set_cancelable(this: &HiddenPluginEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &HiddenPluginEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HiddenPluginEventInit, val: bool); + pub fn set_composed(this: &HiddenPluginEventInit, val: bool); } impl HiddenPluginEventInit { #[doc = "Construct a new `HiddenPluginEventInit`."] @@ -26,25 +50,19 @@ impl HiddenPluginEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_HitRegionOptions.rs b/crates/web-sys/src/features/gen_HitRegionOptions.rs index ebbfcefeb31..fa0ea9ed78e 100644 --- a/crates/web-sys/src/features/gen_HitRegionOptions.rs +++ b/crates/web-sys/src/features/gen_HitRegionOptions.rs @@ -11,13 +11,39 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] pub type HitRegionOptions; #[cfg(feature = "Element")] + #[doc = "Get the `control` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] + #[wasm_bindgen(method, getter = "control")] + pub fn get_control(this: &HitRegionOptions) -> Option; + #[cfg(feature = "Element")] + #[doc = "Change the `control` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] #[wasm_bindgen(method, setter = "control")] - fn control_shim(this: &HitRegionOptions, val: Option<&Element>); + pub fn set_control(this: &HitRegionOptions, val: Option<&Element>); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &HitRegionOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &HitRegionOptions, val: &str); + pub fn set_id(this: &HitRegionOptions, val: &str); + #[cfg(feature = "Path2d")] + #[doc = "Get the `path` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] + #[wasm_bindgen(method, getter = "path")] + pub fn get_path(this: &HitRegionOptions) -> Option; #[cfg(feature = "Path2d")] + #[doc = "Change the `path` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] #[wasm_bindgen(method, setter = "path")] - fn path_shim(this: &HitRegionOptions, val: Option<&Path2d>); + pub fn set_path(this: &HitRegionOptions, val: Option<&Path2d>); } impl HitRegionOptions { #[doc = "Construct a new `HitRegionOptions`."] @@ -29,26 +55,20 @@ impl HitRegionOptions { ret } #[cfg(feature = "Element")] - #[doc = "Change the `control` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] + #[deprecated = "Use `set_control()` instead."] pub fn control(&mut self, val: Option<&Element>) -> &mut Self { - self.control_shim(val); + self.set_control(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } #[cfg(feature = "Path2d")] - #[doc = "Change the `path` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] + #[deprecated = "Use `set_path()` instead."] pub fn path(&mut self, val: Option<&Path2d>) -> &mut Self { - self.path_shim(val); + self.set_path(val); self } } diff --git a/crates/web-sys/src/features/gen_HkdfParams.rs b/crates/web-sys/src/features/gen_HkdfParams.rs index ba49af7229d..e0b6f86a332 100644 --- a/crates/web-sys/src/features/gen_HkdfParams.rs +++ b/crates/web-sys/src/features/gen_HkdfParams.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub type HkdfParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &HkdfParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HkdfParams, val: &str); + pub fn set_name(this: &HkdfParams, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &HkdfParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HkdfParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HkdfParams, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `info` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[wasm_bindgen(method, getter = "info")] + pub fn get_info(this: &HkdfParams) -> ::js_sys::Object; + #[doc = "Change the `info` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "info")] - fn info_shim(this: &HkdfParams, val: &::js_sys::Object); + pub fn set_info(this: &HkdfParams, val: &::js_sys::Object); + #[doc = "Get the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[wasm_bindgen(method, getter = "salt")] + pub fn get_salt(this: &HkdfParams) -> ::js_sys::Object; + #[doc = "Change the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] #[wasm_bindgen(method, setter = "salt")] - fn salt_shim(this: &HkdfParams, val: &::js_sys::Object); + pub fn set_salt(this: &HkdfParams, val: &::js_sys::Object); } impl HkdfParams { #[doc = "Construct a new `HkdfParams`."] @@ -37,32 +69,24 @@ impl HkdfParams { ret.salt(salt); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } - #[doc = "Change the `info` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_info()` instead."] pub fn info(&mut self, val: &::js_sys::Object) -> &mut Self { - self.info_shim(val); + self.set_info(val); self } - #[doc = "Change the `salt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + #[deprecated = "Use `set_salt()` instead."] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { - self.salt_shim(val); + self.set_salt(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs index dd912acbd23..40047b3e4a9 100644 --- a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] pub type HmacDerivedKeyParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &HmacDerivedKeyParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacDerivedKeyParams, val: &str); + pub fn set_name(this: &HmacDerivedKeyParams, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &HmacDerivedKeyParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &HmacDerivedKeyParams) -> Option; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacDerivedKeyParams, val: u32); + pub fn set_length(this: &HmacDerivedKeyParams, val: u32); } impl HmacDerivedKeyParams { #[doc = "Construct a new `HmacDerivedKeyParams`."] @@ -28,25 +52,19 @@ impl HmacDerivedKeyParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacImportParams.rs b/crates/web-sys/src/features/gen_HmacImportParams.rs index 1fbc6013647..685b5ff5e7a 100644 --- a/crates/web-sys/src/features/gen_HmacImportParams.rs +++ b/crates/web-sys/src/features/gen_HmacImportParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] pub type HmacImportParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &HmacImportParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacImportParams, val: &str); + pub fn set_name(this: &HmacImportParams, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &HmacImportParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); } impl HmacImportParams { #[doc = "Construct a new `HmacImportParams`."] @@ -26,18 +42,14 @@ impl HmacImportParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs index e45ef81f604..de8a8cac708 100644 --- a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] pub type HmacKeyAlgorithm; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &HmacKeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacKeyAlgorithm, val: &str); + pub fn set_name(this: &HmacKeyAlgorithm, val: &str); #[cfg(feature = "KeyAlgorithm")] + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &HmacKeyAlgorithm) -> KeyAlgorithm; + #[cfg(feature = "KeyAlgorithm")] + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); + pub fn set_hash(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &HmacKeyAlgorithm) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacKeyAlgorithm, val: u32); + pub fn set_length(this: &HmacKeyAlgorithm, val: u32); } impl HmacKeyAlgorithm { #[cfg(feature = "KeyAlgorithm")] @@ -31,26 +56,20 @@ impl HmacKeyAlgorithm { ret.length(length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "KeyAlgorithm")] - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &KeyAlgorithm) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs index 0ccceb4973a..7363659e1de 100644 --- a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] pub type HmacKeyGenParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &HmacKeyGenParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacKeyGenParams, val: &str); + pub fn set_name(this: &HmacKeyGenParams, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &HmacKeyGenParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &HmacKeyGenParams) -> Option; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacKeyGenParams, val: u32); + pub fn set_length(this: &HmacKeyGenParams, val: u32); } impl HmacKeyGenParams { #[doc = "Construct a new `HmacKeyGenParams`."] @@ -28,25 +52,19 @@ impl HmacKeyGenParams { ret.hash(hash); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnDict.rs b/crates/web-sys/src/features/gen_HttpConnDict.rs index 04bbdd65a96..754d2fe96e0 100644 --- a/crates/web-sys/src/features/gen_HttpConnDict.rs +++ b/crates/web-sys/src/features/gen_HttpConnDict.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] pub type HttpConnDict; + #[doc = "Get the `connections` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] + #[wasm_bindgen(method, getter = "connections")] + pub fn get_connections(this: &HttpConnDict) -> Option<::js_sys::Array>; + #[doc = "Change the `connections` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] #[wasm_bindgen(method, setter = "connections")] - fn connections_shim(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); + pub fn set_connections(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); } impl HttpConnDict { #[doc = "Construct a new `HttpConnDict`."] @@ -22,11 +30,9 @@ impl HttpConnDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `connections` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] + #[deprecated = "Use `set_connections()` instead."] pub fn connections(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.connections_shim(val); + self.set_connections(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnInfo.rs b/crates/web-sys/src/features/gen_HttpConnInfo.rs index 42ec871b2b8..21819e6a530 100644 --- a/crates/web-sys/src/features/gen_HttpConnInfo.rs +++ b/crates/web-sys/src/features/gen_HttpConnInfo.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] pub type HttpConnInfo; + #[doc = "Get the `protocolVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[wasm_bindgen(method, getter = "protocolVersion")] + pub fn get_protocol_version(this: &HttpConnInfo) -> Option; + #[doc = "Change the `protocolVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "protocolVersion")] - fn protocol_version_shim(this: &HttpConnInfo, val: &str); + pub fn set_protocol_version(this: &HttpConnInfo, val: &str); + #[doc = "Get the `rtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[wasm_bindgen(method, getter = "rtt")] + pub fn get_rtt(this: &HttpConnInfo) -> Option; + #[doc = "Change the `rtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "rtt")] - fn rtt_shim(this: &HttpConnInfo, val: u32); + pub fn set_rtt(this: &HttpConnInfo, val: u32); + #[doc = "Get the `ttl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[wasm_bindgen(method, getter = "ttl")] + pub fn get_ttl(this: &HttpConnInfo) -> Option; + #[doc = "Change the `ttl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] #[wasm_bindgen(method, setter = "ttl")] - fn ttl_shim(this: &HttpConnInfo, val: u32); + pub fn set_ttl(this: &HttpConnInfo, val: u32); } impl HttpConnInfo { #[doc = "Construct a new `HttpConnInfo`."] @@ -26,25 +50,19 @@ impl HttpConnInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `protocolVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_protocol_version()` instead."] pub fn protocol_version(&mut self, val: &str) -> &mut Self { - self.protocol_version_shim(val); + self.set_protocol_version(val); self } - #[doc = "Change the `rtt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_rtt()` instead."] pub fn rtt(&mut self, val: u32) -> &mut Self { - self.rtt_shim(val); + self.set_rtt(val); self } - #[doc = "Change the `ttl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + #[deprecated = "Use `set_ttl()` instead."] pub fn ttl(&mut self, val: u32) -> &mut Self { - self.ttl_shim(val); + self.set_ttl(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnectionElement.rs b/crates/web-sys/src/features/gen_HttpConnectionElement.rs index fe702139824..8488fc9d2bc 100644 --- a/crates/web-sys/src/features/gen_HttpConnectionElement.rs +++ b/crates/web-sys/src/features/gen_HttpConnectionElement.rs @@ -10,20 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub type HttpConnectionElement; + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "active")] + pub fn get_active(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_active(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `halfOpens` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "halfOpens")] + pub fn get_half_opens(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `halfOpens` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "halfOpens")] - fn half_opens_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_half_opens(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "host")] + pub fn get_host(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "host")] - fn host_shim(this: &HttpConnectionElement, val: &str); + pub fn set_host(this: &HttpConnectionElement, val: &str); + #[doc = "Get the `idle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "idle")] + pub fn get_idle(this: &HttpConnectionElement) -> Option<::js_sys::Array>; + #[doc = "Change the `idle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "idle")] - fn idle_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + pub fn set_idle(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "port")] + pub fn get_port(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &HttpConnectionElement, val: u32); + pub fn set_port(this: &HttpConnectionElement, val: u32); + #[doc = "Get the `spdy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "spdy")] + pub fn get_spdy(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `spdy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "spdy")] - fn spdy_shim(this: &HttpConnectionElement, val: bool); + pub fn set_spdy(this: &HttpConnectionElement, val: bool); + #[doc = "Get the `ssl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[wasm_bindgen(method, getter = "ssl")] + pub fn get_ssl(this: &HttpConnectionElement) -> Option; + #[doc = "Change the `ssl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] #[wasm_bindgen(method, setter = "ssl")] - fn ssl_shim(this: &HttpConnectionElement, val: bool); + pub fn set_ssl(this: &HttpConnectionElement, val: bool); } impl HttpConnectionElement { #[doc = "Construct a new `HttpConnectionElement`."] @@ -34,53 +90,39 @@ impl HttpConnectionElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.active_shim(val); + self.set_active(val); self } - #[doc = "Change the `halfOpens` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_half_opens()` instead."] pub fn half_opens(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.half_opens_shim(val); + self.set_half_opens(val); self } - #[doc = "Change the `host` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_host()` instead."] pub fn host(&mut self, val: &str) -> &mut Self { - self.host_shim(val); + self.set_host(val); self } - #[doc = "Change the `idle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_idle()` instead."] pub fn idle(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.idle_shim(val); + self.set_idle(val); self } - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: u32) -> &mut Self { - self.port_shim(val); + self.set_port(val); self } - #[doc = "Change the `spdy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_spdy()` instead."] pub fn spdy(&mut self, val: bool) -> &mut Self { - self.spdy_shim(val); + self.set_spdy(val); self } - #[doc = "Change the `ssl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + #[deprecated = "Use `set_ssl()` instead."] pub fn ssl(&mut self, val: bool) -> &mut Self { - self.ssl_shim(val); + self.set_ssl(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs index fabebd3008f..2ec009b1338 100644 --- a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs +++ b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] pub type IdbFileMetadataParameters; + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[wasm_bindgen(method, getter = "lastModified")] + pub fn get_last_modified(this: &IdbFileMetadataParameters) -> Option; + #[doc = "Change the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &IdbFileMetadataParameters, val: bool); + pub fn set_last_modified(this: &IdbFileMetadataParameters, val: bool); + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &IdbFileMetadataParameters) -> Option; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &IdbFileMetadataParameters, val: bool); + pub fn set_size(this: &IdbFileMetadataParameters, val: bool); } impl IdbFileMetadataParameters { #[doc = "Construct a new `IdbFileMetadataParameters`."] @@ -24,18 +40,14 @@ impl IdbFileMetadataParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lastModified` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[deprecated = "Use `set_last_modified()` instead."] pub fn last_modified(&mut self, val: bool) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: bool) -> &mut Self { - self.size_shim(val); + self.set_size(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbIndexParameters.rs b/crates/web-sys/src/features/gen_IdbIndexParameters.rs index b4ac9086a39..9238e85f6ff 100644 --- a/crates/web-sys/src/features/gen_IdbIndexParameters.rs +++ b/crates/web-sys/src/features/gen_IdbIndexParameters.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] pub type IdbIndexParameters; + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[wasm_bindgen(method, getter = "locale")] + pub fn get_locale(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &IdbIndexParameters, val: Option<&str>); + pub fn set_locale(this: &IdbIndexParameters, val: Option<&str>); + #[doc = "Get the `multiEntry` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[wasm_bindgen(method, getter = "multiEntry")] + pub fn get_multi_entry(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `multiEntry` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "multiEntry")] - fn multi_entry_shim(this: &IdbIndexParameters, val: bool); + pub fn set_multi_entry(this: &IdbIndexParameters, val: bool); + #[doc = "Get the `unique` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[wasm_bindgen(method, getter = "unique")] + pub fn get_unique(this: &IdbIndexParameters) -> Option; + #[doc = "Change the `unique` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] #[wasm_bindgen(method, setter = "unique")] - fn unique_shim(this: &IdbIndexParameters, val: bool); + pub fn set_unique(this: &IdbIndexParameters, val: bool); } impl IdbIndexParameters { #[doc = "Construct a new `IdbIndexParameters`."] @@ -26,25 +50,19 @@ impl IdbIndexParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: Option<&str>) -> &mut Self { - self.locale_shim(val); + self.set_locale(val); self } - #[doc = "Change the `multiEntry` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_multi_entry()` instead."] pub fn multi_entry(&mut self, val: bool) -> &mut Self { - self.multi_entry_shim(val); + self.set_multi_entry(val); self } - #[doc = "Change the `unique` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + #[deprecated = "Use `set_unique()` instead."] pub fn unique(&mut self, val: bool) -> &mut Self { - self.unique_shim(val); + self.set_unique(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs index be0d078c977..03ce907e3c8 100644 --- a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs +++ b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] pub type IdbObjectStoreParameters; + #[doc = "Get the `autoIncrement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[wasm_bindgen(method, getter = "autoIncrement")] + pub fn get_auto_increment(this: &IdbObjectStoreParameters) -> Option; + #[doc = "Change the `autoIncrement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, setter = "autoIncrement")] - fn auto_increment_shim(this: &IdbObjectStoreParameters, val: bool); + pub fn set_auto_increment(this: &IdbObjectStoreParameters, val: bool); + #[doc = "Get the `keyPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[wasm_bindgen(method, getter = "keyPath")] + pub fn get_key_path(this: &IdbObjectStoreParameters) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `keyPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] #[wasm_bindgen(method, setter = "keyPath")] - fn key_path_shim(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); + pub fn set_key_path(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); } impl IdbObjectStoreParameters { #[doc = "Construct a new `IdbObjectStoreParameters`."] @@ -24,18 +40,14 @@ impl IdbObjectStoreParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoIncrement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[deprecated = "Use `set_auto_increment()` instead."] pub fn auto_increment(&mut self, val: bool) -> &mut Self { - self.auto_increment_shim(val); + self.set_auto_increment(val); self } - #[doc = "Change the `keyPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + #[deprecated = "Use `set_key_path()` instead."] pub fn key_path(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.key_path_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_key_path(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } } diff --git a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs index e5839a07b1c..162108e06b4 100644 --- a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs +++ b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs @@ -11,10 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] pub type IdbOpenDbOptions; #[cfg(feature = "StorageType")] + #[doc = "Get the `storage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] + #[wasm_bindgen(method, getter = "storage")] + pub fn get_storage(this: &IdbOpenDbOptions) -> Option; + #[cfg(feature = "StorageType")] + #[doc = "Change the `storage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] #[wasm_bindgen(method, setter = "storage")] - fn storage_shim(this: &IdbOpenDbOptions, val: StorageType); + pub fn set_storage(this: &IdbOpenDbOptions, val: StorageType); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &IdbOpenDbOptions) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &IdbOpenDbOptions, val: f64); + pub fn set_version(this: &IdbOpenDbOptions, val: f64); } impl IdbOpenDbOptions { #[doc = "Construct a new `IdbOpenDbOptions`."] @@ -26,18 +43,14 @@ impl IdbOpenDbOptions { ret } #[cfg(feature = "StorageType")] - #[doc = "Change the `storage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] + #[deprecated = "Use `set_storage()` instead."] pub fn storage(&mut self, val: StorageType) -> &mut Self { - self.storage_shim(val); + self.set_storage(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: f64) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs index 65ae93c1d7e..ccd13f69620 100644 --- a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub type IdbVersionChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_bubbles(this: &IdbVersionChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_cancelable(this: &IdbVersionChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &IdbVersionChangeEventInit, val: bool); + pub fn set_composed(this: &IdbVersionChangeEventInit, val: bool); + #[doc = "Get the `newVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[wasm_bindgen(method, getter = "newVersion")] + pub fn get_new_version(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `newVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "newVersion")] - fn new_version_shim(this: &IdbVersionChangeEventInit, val: Option); + pub fn set_new_version(this: &IdbVersionChangeEventInit, val: Option); + #[doc = "Get the `oldVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[wasm_bindgen(method, getter = "oldVersion")] + pub fn get_old_version(this: &IdbVersionChangeEventInit) -> Option; + #[doc = "Change the `oldVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] #[wasm_bindgen(method, setter = "oldVersion")] - fn old_version_shim(this: &IdbVersionChangeEventInit, val: f64); + pub fn set_old_version(this: &IdbVersionChangeEventInit, val: f64); } impl IdbVersionChangeEventInit { #[doc = "Construct a new `IdbVersionChangeEventInit`."] @@ -30,39 +70,29 @@ impl IdbVersionChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `newVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_new_version()` instead."] pub fn new_version(&mut self, val: Option) -> &mut Self { - self.new_version_shim(val); + self.set_new_version(val); self } - #[doc = "Change the `oldVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + #[deprecated = "Use `set_old_version()` instead."] pub fn old_version(&mut self, val: f64) -> &mut Self { - self.old_version_shim(val); + self.set_old_version(val); self } } diff --git a/crates/web-sys/src/features/gen_IdleRequestOptions.rs b/crates/web-sys/src/features/gen_IdleRequestOptions.rs index b0b550ed8b4..cd5e78a4b18 100644 --- a/crates/web-sys/src/features/gen_IdleRequestOptions.rs +++ b/crates/web-sys/src/features/gen_IdleRequestOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] pub type IdleRequestOptions; + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] + #[wasm_bindgen(method, getter = "timeout")] + pub fn get_timeout(this: &IdleRequestOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &IdleRequestOptions, val: u32); + pub fn set_timeout(this: &IdleRequestOptions, val: u32); } impl IdleRequestOptions { #[doc = "Construct a new `IdleRequestOptions`."] @@ -22,11 +30,9 @@ impl IdleRequestOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout(val); self } } diff --git a/crates/web-sys/src/features/gen_IirFilterOptions.rs b/crates/web-sys/src/features/gen_IirFilterOptions.rs index b88375ed03b..60c8530fbdb 100644 --- a/crates/web-sys/src/features/gen_IirFilterOptions.rs +++ b/crates/web-sys/src/features/gen_IirFilterOptions.rs @@ -10,18 +10,60 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] pub type IirFilterOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &IirFilterOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &IirFilterOptions, val: u32); + pub fn set_channel_count(this: &IirFilterOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &IirFilterOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &IirFilterOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &IirFilterOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &IirFilterOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &IirFilterOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &IirFilterOptions, val: ChannelInterpretation); + #[doc = "Get the `feedback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[wasm_bindgen(method, getter = "feedback")] + pub fn get_feedback(this: &IirFilterOptions) -> ::js_sys::Array; + #[doc = "Change the `feedback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "feedback")] - fn feedback_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + pub fn set_feedback(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `feedforward` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[wasm_bindgen(method, getter = "feedforward")] + pub fn get_feedforward(this: &IirFilterOptions) -> ::js_sys::Array; + #[doc = "Change the `feedforward` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] #[wasm_bindgen(method, setter = "feedforward")] - fn feedforward_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + pub fn set_feedforward(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); } impl IirFilterOptions { #[doc = "Construct a new `IirFilterOptions`."] @@ -34,41 +76,31 @@ impl IirFilterOptions { ret.feedforward(feedforward); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `feedback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_feedback()` instead."] pub fn feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feedback_shim(val); + self.set_feedback(val); self } - #[doc = "Change the `feedforward` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + #[deprecated = "Use `set_feedforward()` instead."] pub fn feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feedforward_shim(val); + self.set_feedforward(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs index 865c2786fd3..2c641c50b29 100644 --- a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs +++ b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs @@ -11,21 +11,73 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] pub type ImageBitmapOptions; #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Get the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] + #[wasm_bindgen(method, getter = "colorSpaceConversion")] + pub fn get_color_space_conversion(this: &ImageBitmapOptions) -> Option; + #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Change the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn color_space_conversion_shim(this: &ImageBitmapOptions, val: ColorSpaceConversion); + pub fn set_color_space_conversion(this: &ImageBitmapOptions, val: ColorSpaceConversion); #[cfg(feature = "ImageOrientation")] + #[doc = "Get the `imageOrientation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] + #[wasm_bindgen(method, getter = "imageOrientation")] + pub fn get_image_orientation(this: &ImageBitmapOptions) -> Option; + #[cfg(feature = "ImageOrientation")] + #[doc = "Change the `imageOrientation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] #[wasm_bindgen(method, setter = "imageOrientation")] - fn image_orientation_shim(this: &ImageBitmapOptions, val: ImageOrientation); + pub fn set_image_orientation(this: &ImageBitmapOptions, val: ImageOrientation); + #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Get the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] + #[wasm_bindgen(method, getter = "premultiplyAlpha")] + pub fn get_premultiply_alpha(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Change the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn premultiply_alpha_shim(this: &ImageBitmapOptions, val: PremultiplyAlpha); + pub fn set_premultiply_alpha(this: &ImageBitmapOptions, val: PremultiplyAlpha); + #[doc = "Get the `resizeHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[wasm_bindgen(method, getter = "resizeHeight")] + pub fn get_resize_height(this: &ImageBitmapOptions) -> Option; + #[doc = "Change the `resizeHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "resizeHeight")] - fn resize_height_shim(this: &ImageBitmapOptions, val: u32); + pub fn set_resize_height(this: &ImageBitmapOptions, val: u32); + #[cfg(feature = "ResizeQuality")] + #[doc = "Get the `resizeQuality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] + #[wasm_bindgen(method, getter = "resizeQuality")] + pub fn get_resize_quality(this: &ImageBitmapOptions) -> Option; #[cfg(feature = "ResizeQuality")] + #[doc = "Change the `resizeQuality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] #[wasm_bindgen(method, setter = "resizeQuality")] - fn resize_quality_shim(this: &ImageBitmapOptions, val: ResizeQuality); + pub fn set_resize_quality(this: &ImageBitmapOptions, val: ResizeQuality); + #[doc = "Get the `resizeWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[wasm_bindgen(method, getter = "resizeWidth")] + pub fn get_resize_width(this: &ImageBitmapOptions) -> Option; + #[doc = "Change the `resizeWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] #[wasm_bindgen(method, setter = "resizeWidth")] - fn resize_width_shim(this: &ImageBitmapOptions, val: u32); + pub fn set_resize_width(this: &ImageBitmapOptions, val: u32); } impl ImageBitmapOptions { #[doc = "Construct a new `ImageBitmapOptions`."] @@ -37,49 +89,37 @@ impl ImageBitmapOptions { ret } #[cfg(feature = "ColorSpaceConversion")] - #[doc = "Change the `colorSpaceConversion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] + #[deprecated = "Use `set_color_space_conversion()` instead."] pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { - self.color_space_conversion_shim(val); + self.set_color_space_conversion(val); self } #[cfg(feature = "ImageOrientation")] - #[doc = "Change the `imageOrientation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] + #[deprecated = "Use `set_image_orientation()` instead."] pub fn image_orientation(&mut self, val: ImageOrientation) -> &mut Self { - self.image_orientation_shim(val); + self.set_image_orientation(val); self } #[cfg(feature = "PremultiplyAlpha")] - #[doc = "Change the `premultiplyAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] + #[deprecated = "Use `set_premultiply_alpha()` instead."] pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { - self.premultiply_alpha_shim(val); + self.set_premultiply_alpha(val); self } - #[doc = "Change the `resizeHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[deprecated = "Use `set_resize_height()` instead."] pub fn resize_height(&mut self, val: u32) -> &mut Self { - self.resize_height_shim(val); + self.set_resize_height(val); self } #[cfg(feature = "ResizeQuality")] - #[doc = "Change the `resizeQuality` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] + #[deprecated = "Use `set_resize_quality()` instead."] pub fn resize_quality(&mut self, val: ResizeQuality) -> &mut Self { - self.resize_quality_shim(val); + self.set_resize_quality(val); self } - #[doc = "Change the `resizeWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + #[deprecated = "Use `set_resize_width()` instead."] pub fn resize_width(&mut self, val: u32) -> &mut Self { - self.resize_width_shim(val); + self.set_resize_width(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs index 093b78e3c67..9edf1b2a999 100644 --- a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs @@ -10,15 +10,51 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] pub type ImageCaptureErrorEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_bubbles(this: &ImageCaptureErrorEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_cancelable(this: &ImageCaptureErrorEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ImageCaptureErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ImageCaptureErrorEventInit, val: bool); + pub fn set_composed(this: &ImageCaptureErrorEventInit, val: bool); #[cfg(feature = "ImageCaptureError")] + #[doc = "Get the `imageCaptureError` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] + #[wasm_bindgen(method, getter = "imageCaptureError")] + pub fn get_image_capture_error(this: &ImageCaptureErrorEventInit) -> Option; + #[cfg(feature = "ImageCaptureError")] + #[doc = "Change the `imageCaptureError` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] #[wasm_bindgen(method, setter = "imageCaptureError")] - fn image_capture_error_shim(this: &ImageCaptureErrorEventInit, val: Option<&ImageCaptureError>); + pub fn set_image_capture_error( + this: &ImageCaptureErrorEventInit, + val: Option<&ImageCaptureError>, + ); } impl ImageCaptureErrorEventInit { #[doc = "Construct a new `ImageCaptureErrorEventInit`."] @@ -29,33 +65,25 @@ impl ImageCaptureErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "ImageCaptureError")] - #[doc = "Change the `imageCaptureError` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] + #[deprecated = "Use `set_image_capture_error()` instead."] pub fn image_capture_error(&mut self, val: Option<&ImageCaptureError>) -> &mut Self { - self.image_capture_error_shim(val); + self.set_image_capture_error(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs index 35fae56cd7b..3b4893ec923 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecodeOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `completeFramesOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "completeFramesOnly")] + pub fn get_complete_frames_only(this: &ImageDecodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `completeFramesOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "completeFramesOnly")] - fn complete_frames_only_shim(this: &ImageDecodeOptions, val: bool); + pub fn set_complete_frames_only(this: &ImageDecodeOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frameIndex")] + pub fn get_frame_index(this: &ImageDecodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `frameIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frameIndex")] - fn frame_index_shim(this: &ImageDecodeOptions, val: u32); + pub fn set_frame_index(this: &ImageDecodeOptions, val: u32); } #[cfg(web_sys_unstable_apis)] impl ImageDecodeOptions { @@ -33,25 +65,15 @@ impl ImageDecodeOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `completeFramesOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_complete_frames_only()` instead."] pub fn complete_frames_only(&mut self, val: bool) -> &mut Self { - self.complete_frames_only_shim(val); + self.set_complete_frames_only(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `frameIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame_index()` instead."] pub fn frame_index(&mut self, val: u32) -> &mut Self { - self.frame_index_shim(val); + self.set_frame_index(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecodeResult.rs b/crates/web-sys/src/features/gen_ImageDecodeResult.rs index 056f4f15364..8810025886c 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeResult.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeResult.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecodeResult; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `complete` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "complete")] + pub fn get_complete(this: &ImageDecodeResult) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `complete` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "complete")] - fn complete_shim(this: &ImageDecodeResult, val: bool); + pub fn set_complete(this: &ImageDecodeResult, val: bool); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoFrame")] + #[doc = "Get the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "image")] + pub fn get_image(this: &ImageDecodeResult) -> VideoFrame; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoFrame")] + #[doc = "Change the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "image")] - fn image_shim(this: &ImageDecodeResult, val: &VideoFrame); + pub fn set_image(this: &ImageDecodeResult, val: &VideoFrame); } #[cfg(web_sys_unstable_apis)] impl ImageDecodeResult { @@ -37,26 +70,16 @@ impl ImageDecodeResult { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `complete` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_complete()` instead."] pub fn complete(&mut self, val: bool) -> &mut Self { - self.complete_shim(val); + self.set_complete(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoFrame")] - #[doc = "Change the `image` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_image()` instead."] pub fn image(&mut self, val: &VideoFrame) -> &mut Self { - self.image_shim(val); + self.set_image(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecoderInit.rs b/crates/web-sys/src/features/gen_ImageDecoderInit.rs index 416e83d64a3..af6e189d3a0 100644 --- a/crates/web-sys/src/features/gen_ImageDecoderInit.rs +++ b/crates/web-sys/src/features/gen_ImageDecoderInit.rs @@ -14,38 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecoderInit; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ColorSpaceConversion")] - #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn color_space_conversion_shim(this: &ImageDecoderInit, val: ColorSpaceConversion); - #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "desiredHeight")] - fn desired_height_shim(this: &ImageDecoderInit, val: u32); - #[wasm_bindgen(method, setter = "desiredWidth")] - fn desired_width_shim(this: &ImageDecoderInit, val: u32); - #[wasm_bindgen(method, setter = "preferAnimation")] - fn prefer_animation_shim(this: &ImageDecoderInit, val: bool); - #[cfg(feature = "PremultiplyAlpha")] - #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn premultiply_alpha_shim(this: &ImageDecoderInit, val: PremultiplyAlpha); - #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ImageDecoderInit, val: &str); -} -#[cfg(web_sys_unstable_apis)] -impl ImageDecoderInit { - #[doc = "Construct a new `ImageDecoderInit`."] + #[doc = "Get the `colorSpaceConversion` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageDecoderInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(data: &::wasm_bindgen::JsValue, type_: &str) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.type_(type_); - ret - } + #[wasm_bindgen(method, getter = "colorSpaceConversion")] + pub fn get_color_space_conversion(this: &ImageDecoderInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ColorSpaceConversion")] #[doc = "Change the `colorSpaceConversion` field of this object."] @@ -54,10 +32,17 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { - self.color_space_conversion_shim(val); - self - } + #[wasm_bindgen(method, setter = "colorSpaceConversion")] + pub fn set_color_space_conversion(this: &ImageDecoderInit, val: ColorSpaceConversion); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &ImageDecoderInit) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `data` field of this object."] #[doc = ""] @@ -65,10 +50,17 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); - self - } + #[wasm_bindgen(method, setter = "data")] + pub fn set_data(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `desiredHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "desiredHeight")] + pub fn get_desired_height(this: &ImageDecoderInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `desiredHeight` field of this object."] #[doc = ""] @@ -76,10 +68,17 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn desired_height(&mut self, val: u32) -> &mut Self { - self.desired_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "desiredHeight")] + pub fn set_desired_height(this: &ImageDecoderInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `desiredWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "desiredWidth")] + pub fn get_desired_width(this: &ImageDecoderInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `desiredWidth` field of this object."] #[doc = ""] @@ -87,10 +86,17 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn desired_width(&mut self, val: u32) -> &mut Self { - self.desired_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "desiredWidth")] + pub fn set_desired_width(this: &ImageDecoderInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `preferAnimation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "preferAnimation")] + pub fn get_prefer_animation(this: &ImageDecoderInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `preferAnimation` field of this object."] #[doc = ""] @@ -98,10 +104,18 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn prefer_animation(&mut self, val: bool) -> &mut Self { - self.prefer_animation_shim(val); - self - } + #[wasm_bindgen(method, setter = "preferAnimation")] + pub fn set_prefer_animation(this: &ImageDecoderInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Get the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`, `PremultiplyAlpha`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "premultiplyAlpha")] + pub fn get_premultiply_alpha(this: &ImageDecoderInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PremultiplyAlpha")] #[doc = "Change the `premultiplyAlpha` field of this object."] @@ -110,10 +124,17 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { - self.premultiply_alpha_shim(val); - self - } + #[wasm_bindgen(method, setter = "premultiplyAlpha")] + pub fn set_premultiply_alpha(this: &ImageDecoderInit, val: PremultiplyAlpha); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &ImageDecoderInit) -> String; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `type` field of this object."] #[doc = ""] @@ -121,8 +142,66 @@ impl ImageDecoderInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "type")] + pub fn set_type(this: &ImageDecoderInit, val: &str); +} +#[cfg(web_sys_unstable_apis)] +impl ImageDecoderInit { + #[doc = "Construct a new `ImageDecoderInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(data: &::wasm_bindgen::JsValue, type_: &str) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.data(data); + ret.type_(type_); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ColorSpaceConversion")] + #[deprecated = "Use `set_color_space_conversion()` instead."] + pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { + self.set_color_space_conversion(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_data()` instead."] + pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_data(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_desired_height()` instead."] + pub fn desired_height(&mut self, val: u32) -> &mut Self { + self.set_desired_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_desired_width()` instead."] + pub fn desired_width(&mut self, val: u32) -> &mut Self { + self.set_desired_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_prefer_animation()` instead."] + pub fn prefer_animation(&mut self, val: bool) -> &mut Self { + self.set_prefer_animation(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PremultiplyAlpha")] + #[deprecated = "Use `set_premultiply_alpha()` instead."] + pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { + self.set_premultiply_alpha(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs index da0a6b82565..acc724aa9b9 100644 --- a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] pub type ImageEncodeOptions; + #[doc = "Get the `quality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[wasm_bindgen(method, getter = "quality")] + pub fn get_quality(this: &ImageEncodeOptions) -> Option; + #[doc = "Change the `quality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, setter = "quality")] - fn quality_shim(this: &ImageEncodeOptions, val: f64); + pub fn set_quality(this: &ImageEncodeOptions, val: f64); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &ImageEncodeOptions) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ImageEncodeOptions, val: &str); + pub fn set_type(this: &ImageEncodeOptions, val: &str); } impl ImageEncodeOptions { #[doc = "Construct a new `ImageEncodeOptions`."] @@ -24,18 +40,14 @@ impl ImageEncodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `quality` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[deprecated = "Use `set_quality()` instead."] pub fn quality(&mut self, val: f64) -> &mut Self { - self.quality_shim(val); + self.set_quality(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_InputEventInit.rs b/crates/web-sys/src/features/gen_InputEventInit.rs index 2b79bf4c57a..0c0423a1461 100644 --- a/crates/web-sys/src/features/gen_InputEventInit.rs +++ b/crates/web-sys/src/features/gen_InputEventInit.rs @@ -10,28 +10,110 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub type InputEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &InputEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &InputEventInit, val: bool); + pub fn set_bubbles(this: &InputEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &InputEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &InputEventInit, val: bool); + pub fn set_cancelable(this: &InputEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &InputEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &InputEventInit, val: bool); + pub fn set_composed(this: &InputEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &InputEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &InputEventInit, val: i32); + pub fn set_detail(this: &InputEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &InputEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &InputEventInit, val: Option<&Window>); + pub fn set_view(this: &InputEventInit, val: Option<&Window>); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &InputEventInit) -> Option; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &InputEventInit, val: Option<&str>); + pub fn set_data(this: &InputEventInit, val: Option<&str>); #[cfg(feature = "DataTransfer")] + #[doc = "Get the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] + #[wasm_bindgen(method, getter = "dataTransfer")] + pub fn get_data_transfer(this: &InputEventInit) -> Option; + #[cfg(feature = "DataTransfer")] + #[doc = "Change the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] #[wasm_bindgen(method, setter = "dataTransfer")] - fn data_transfer_shim(this: &InputEventInit, val: Option<&DataTransfer>); + pub fn set_data_transfer(this: &InputEventInit, val: Option<&DataTransfer>); + #[doc = "Get the `inputType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "inputType")] + pub fn get_input_type(this: &InputEventInit) -> Option; + #[doc = "Change the `inputType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "inputType")] - fn input_type_shim(this: &InputEventInit, val: &str); + pub fn set_input_type(this: &InputEventInit, val: &str); + #[doc = "Get the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "isComposing")] + pub fn get_is_composing(this: &InputEventInit) -> Option; + #[doc = "Change the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "isComposing")] - fn is_composing_shim(this: &InputEventInit, val: bool); + pub fn set_is_composing(this: &InputEventInit, val: bool); + #[doc = "Get the `targetRanges` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[wasm_bindgen(method, getter = "targetRanges")] + pub fn get_target_ranges(this: &InputEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `targetRanges` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] #[wasm_bindgen(method, setter = "targetRanges")] - fn target_ranges_shim(this: &InputEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_target_ranges(this: &InputEventInit, val: &::wasm_bindgen::JsValue); } impl InputEventInit { #[doc = "Construct a new `InputEventInit`."] @@ -42,76 +124,56 @@ impl InputEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&str>) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } #[cfg(feature = "DataTransfer")] - #[doc = "Change the `dataTransfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] + #[deprecated = "Use `set_data_transfer()` instead."] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.data_transfer_shim(val); + self.set_data_transfer(val); self } - #[doc = "Change the `inputType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_input_type()` instead."] pub fn input_type(&mut self, val: &str) -> &mut Self { - self.input_type_shim(val); + self.set_input_type(val); self } - #[doc = "Change the `isComposing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_is_composing()` instead."] pub fn is_composing(&mut self, val: bool) -> &mut Self { - self.is_composing_shim(val); + self.set_is_composing(val); self } - #[doc = "Change the `targetRanges` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + #[deprecated = "Use `set_target_ranges()` instead."] pub fn target_ranges(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.target_ranges_shim(val); + self.set_target_ranges(val); self } } diff --git a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs index caa9de343c9..e9588ef123a 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs @@ -11,19 +11,63 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] pub type IntersectionObserverEntryInit; #[cfg(feature = "DomRectInit")] + #[doc = "Get the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[wasm_bindgen(method, getter = "boundingClientRect")] + pub fn get_bounding_client_rect(this: &IntersectionObserverEntryInit) -> DomRectInit; + #[cfg(feature = "DomRectInit")] + #[doc = "Change the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn bounding_client_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_bounding_client_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); #[cfg(feature = "DomRectInit")] + #[doc = "Get the `intersectionRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[wasm_bindgen(method, getter = "intersectionRect")] + pub fn get_intersection_rect(this: &IntersectionObserverEntryInit) -> DomRectInit; + #[cfg(feature = "DomRectInit")] + #[doc = "Change the `intersectionRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "intersectionRect")] - fn intersection_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_intersection_rect(this: &IntersectionObserverEntryInit, val: &DomRectInit); + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `rootBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[wasm_bindgen(method, getter = "rootBounds")] + pub fn get_root_bounds(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] + #[doc = "Change the `rootBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "rootBounds")] - fn root_bounds_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + pub fn set_root_bounds(this: &IntersectionObserverEntryInit, val: &DomRectInit); #[cfg(feature = "Element")] + #[doc = "Get the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] + #[wasm_bindgen(method, getter = "target")] + pub fn get_target(this: &IntersectionObserverEntryInit) -> Element; + #[cfg(feature = "Element")] + #[doc = "Change the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "target")] - fn target_shim(this: &IntersectionObserverEntryInit, val: &Element); + pub fn set_target(this: &IntersectionObserverEntryInit, val: &Element); + #[doc = "Get the `time` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] + #[wasm_bindgen(method, getter = "time")] + pub fn get_time(this: &IntersectionObserverEntryInit) -> f64; + #[doc = "Change the `time` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] #[wasm_bindgen(method, setter = "time")] - fn time_shim(this: &IntersectionObserverEntryInit, val: f64); + pub fn set_time(this: &IntersectionObserverEntryInit, val: f64); } impl IntersectionObserverEntryInit { #[cfg(all(feature = "DomRectInit", feature = "Element",))] @@ -47,42 +91,32 @@ impl IntersectionObserverEntryInit { ret } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `boundingClientRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_bounding_client_rect()` instead."] pub fn bounding_client_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.bounding_client_rect_shim(val); + self.set_bounding_client_rect(val); self } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `intersectionRect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_intersection_rect()` instead."] pub fn intersection_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.intersection_rect_shim(val); + self.set_intersection_rect(val); self } #[cfg(feature = "DomRectInit")] - #[doc = "Change the `rootBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_root_bounds()` instead."] pub fn root_bounds(&mut self, val: &DomRectInit) -> &mut Self { - self.root_bounds_shim(val); + self.set_root_bounds(val); self } #[cfg(feature = "Element")] - #[doc = "Change the `target` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_target()` instead."] pub fn target(&mut self, val: &Element) -> &mut Self { - self.target_shim(val); + self.set_target(val); self } - #[doc = "Change the `time` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] + #[deprecated = "Use `set_time()` instead."] pub fn time(&mut self, val: f64) -> &mut Self { - self.time_shim(val); + self.set_time(val); self } } diff --git a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs index 13c7411b698..115d8359ff6 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs @@ -11,12 +11,37 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] pub type IntersectionObserverInit; #[cfg(feature = "Element")] + #[doc = "Get the `root` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] + #[wasm_bindgen(method, getter = "root")] + pub fn get_root(this: &IntersectionObserverInit) -> Option; + #[cfg(feature = "Element")] + #[doc = "Change the `root` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "root")] - fn root_shim(this: &IntersectionObserverInit, val: Option<&Element>); + pub fn set_root(this: &IntersectionObserverInit, val: Option<&Element>); + #[doc = "Get the `rootMargin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[wasm_bindgen(method, getter = "rootMargin")] + pub fn get_root_margin(this: &IntersectionObserverInit) -> Option; + #[doc = "Change the `rootMargin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "rootMargin")] - fn root_margin_shim(this: &IntersectionObserverInit, val: &str); + pub fn set_root_margin(this: &IntersectionObserverInit, val: &str); + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[wasm_bindgen(method, getter = "threshold")] + pub fn get_threshold(this: &IntersectionObserverInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_threshold(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); } impl IntersectionObserverInit { #[doc = "Construct a new `IntersectionObserverInit`."] @@ -28,25 +53,19 @@ impl IntersectionObserverInit { ret } #[cfg(feature = "Element")] - #[doc = "Change the `root` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] + #[deprecated = "Use `set_root()` instead."] pub fn root(&mut self, val: Option<&Element>) -> &mut Self { - self.root_shim(val); + self.set_root(val); self } - #[doc = "Change the `rootMargin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[deprecated = "Use `set_root_margin()` instead."] pub fn root_margin(&mut self, val: &str) -> &mut Self { - self.root_margin_shim(val); + self.set_root_margin(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.threshold_shim(val); + self.set_threshold(val); self } } diff --git a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs index 2aba174f2da..b627894cb70 100644 --- a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs +++ b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type IsInputPendingOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `includeContinuous` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "includeContinuous")] + pub fn get_include_continuous(this: &IsInputPendingOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `includeContinuous` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "includeContinuous")] - fn include_continuous_shim(this: &IsInputPendingOptions, val: bool); + pub fn set_include_continuous(this: &IsInputPendingOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl IsInputPendingOptions { @@ -31,14 +47,9 @@ impl IsInputPendingOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `includeContinuous` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_include_continuous()` instead."] pub fn include_continuous(&mut self, val: bool) -> &mut Self { - self.include_continuous_shim(val); + self.set_include_continuous(val); self } } diff --git a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs index 85b0c3497f9..d6c2c0b81fc 100644 --- a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] pub type IterableKeyAndValueResult; + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[wasm_bindgen(method, getter = "done")] + pub fn get_done(this: &IterableKeyAndValueResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &IterableKeyAndValueResult, val: bool); + pub fn set_done(this: &IterableKeyAndValueResult, val: bool); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &IterableKeyAndValueResult) -> Option<::js_sys::Array>; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); } impl IterableKeyAndValueResult { #[doc = "Construct a new `IterableKeyAndValueResult`."] @@ -24,18 +40,14 @@ impl IterableKeyAndValueResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs index 7e76fde4bea..366d7aaae76 100644 --- a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] pub type IterableKeyOrValueResult; + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[wasm_bindgen(method, getter = "done")] + pub fn get_done(this: &IterableKeyOrValueResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &IterableKeyOrValueResult, val: bool); + pub fn set_done(this: &IterableKeyOrValueResult, val: bool); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &IterableKeyOrValueResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); } impl IterableKeyOrValueResult { #[doc = "Construct a new `IterableKeyOrValueResult`."] @@ -24,18 +40,14 @@ impl IterableKeyOrValueResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_JsonWebKey.rs b/crates/web-sys/src/features/gen_JsonWebKey.rs index 04e6cfb11a0..7969e461a34 100644 --- a/crates/web-sys/src/features/gen_JsonWebKey.rs +++ b/crates/web-sys/src/features/gen_JsonWebKey.rs @@ -10,42 +10,186 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub type JsonWebKey; + #[doc = "Get the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "alg")] + pub fn get_alg(this: &JsonWebKey) -> Option; + #[doc = "Change the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "alg")] - fn alg_shim(this: &JsonWebKey, val: &str); + pub fn set_alg(this: &JsonWebKey, val: &str); + #[doc = "Get the `crv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "crv")] + pub fn get_crv(this: &JsonWebKey) -> Option; + #[doc = "Change the `crv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "crv")] - fn crv_shim(this: &JsonWebKey, val: &str); + pub fn set_crv(this: &JsonWebKey, val: &str); + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "d")] + pub fn get_d(this: &JsonWebKey) -> Option; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &JsonWebKey, val: &str); + pub fn set_d(this: &JsonWebKey, val: &str); + #[doc = "Get the `dp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "dp")] + pub fn get_dp(this: &JsonWebKey) -> Option; + #[doc = "Change the `dp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "dp")] - fn dp_shim(this: &JsonWebKey, val: &str); + pub fn set_dp(this: &JsonWebKey, val: &str); + #[doc = "Get the `dq` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "dq")] + pub fn get_dq(this: &JsonWebKey) -> Option; + #[doc = "Change the `dq` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "dq")] - fn dq_shim(this: &JsonWebKey, val: &str); + pub fn set_dq(this: &JsonWebKey, val: &str); + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "e")] + pub fn get_e(this: &JsonWebKey) -> Option; + #[doc = "Change the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &JsonWebKey, val: &str); + pub fn set_e(this: &JsonWebKey, val: &str); + #[doc = "Get the `ext` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "ext")] + pub fn get_ext(this: &JsonWebKey) -> Option; + #[doc = "Change the `ext` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "ext")] - fn ext_shim(this: &JsonWebKey, val: bool); + pub fn set_ext(this: &JsonWebKey, val: bool); + #[doc = "Get the `k` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "k")] + pub fn get_k(this: &JsonWebKey) -> Option; + #[doc = "Change the `k` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "k")] - fn k_shim(this: &JsonWebKey, val: &str); + pub fn set_k(this: &JsonWebKey, val: &str); + #[doc = "Get the `key_ops` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "key_ops")] + pub fn get_key_ops(this: &JsonWebKey) -> Option<::js_sys::Array>; + #[doc = "Change the `key_ops` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "key_ops")] - fn key_ops_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + pub fn set_key_ops(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `kty` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "kty")] + pub fn get_kty(this: &JsonWebKey) -> String; + #[doc = "Change the `kty` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "kty")] - fn kty_shim(this: &JsonWebKey, val: &str); + pub fn set_kty(this: &JsonWebKey, val: &str); + #[doc = "Get the `n` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "n")] + pub fn get_n(this: &JsonWebKey) -> Option; + #[doc = "Change the `n` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "n")] - fn n_shim(this: &JsonWebKey, val: &str); + pub fn set_n(this: &JsonWebKey, val: &str); + #[doc = "Get the `oth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "oth")] + pub fn get_oth(this: &JsonWebKey) -> Option<::js_sys::Array>; + #[doc = "Change the `oth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "oth")] - fn oth_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + pub fn set_oth(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `p` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "p")] + pub fn get_p(this: &JsonWebKey) -> Option; + #[doc = "Change the `p` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "p")] - fn p_shim(this: &JsonWebKey, val: &str); + pub fn set_p(this: &JsonWebKey, val: &str); + #[doc = "Get the `q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "q")] + pub fn get_q(this: &JsonWebKey) -> Option; + #[doc = "Change the `q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "q")] - fn q_shim(this: &JsonWebKey, val: &str); + pub fn set_q(this: &JsonWebKey, val: &str); + #[doc = "Get the `qi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "qi")] + pub fn get_qi(this: &JsonWebKey) -> Option; + #[doc = "Change the `qi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "qi")] - fn qi_shim(this: &JsonWebKey, val: &str); + pub fn set_qi(this: &JsonWebKey, val: &str); + #[doc = "Get the `use` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "use")] + pub fn get_use(this: &JsonWebKey) -> Option; + #[doc = "Change the `use` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "use")] - fn use__shim(this: &JsonWebKey, val: &str); + pub fn set_use(this: &JsonWebKey, val: &str); + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &JsonWebKey) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &JsonWebKey, val: &str); + pub fn set_x(this: &JsonWebKey, val: &str); + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &JsonWebKey) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &JsonWebKey, val: &str); + pub fn set_y(this: &JsonWebKey, val: &str); } impl JsonWebKey { #[doc = "Construct a new `JsonWebKey`."] @@ -57,130 +201,94 @@ impl JsonWebKey { ret.kty(kty); ret } - #[doc = "Change the `alg` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_alg()` instead."] pub fn alg(&mut self, val: &str) -> &mut Self { - self.alg_shim(val); + self.set_alg(val); self } - #[doc = "Change the `crv` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_crv()` instead."] pub fn crv(&mut self, val: &str) -> &mut Self { - self.crv_shim(val); + self.set_crv(val); self } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: &str) -> &mut Self { - self.d_shim(val); + self.set_d(val); self } - #[doc = "Change the `dp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_dp()` instead."] pub fn dp(&mut self, val: &str) -> &mut Self { - self.dp_shim(val); + self.set_dp(val); self } - #[doc = "Change the `dq` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_dq()` instead."] pub fn dq(&mut self, val: &str) -> &mut Self { - self.dq_shim(val); + self.set_dq(val); self } - #[doc = "Change the `e` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_e()` instead."] pub fn e(&mut self, val: &str) -> &mut Self { - self.e_shim(val); + self.set_e(val); self } - #[doc = "Change the `ext` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_ext()` instead."] pub fn ext(&mut self, val: bool) -> &mut Self { - self.ext_shim(val); + self.set_ext(val); self } - #[doc = "Change the `k` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_k()` instead."] pub fn k(&mut self, val: &str) -> &mut Self { - self.k_shim(val); + self.set_k(val); self } - #[doc = "Change the `key_ops` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_key_ops()` instead."] pub fn key_ops(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.key_ops_shim(val); + self.set_key_ops(val); self } - #[doc = "Change the `kty` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_kty()` instead."] pub fn kty(&mut self, val: &str) -> &mut Self { - self.kty_shim(val); + self.set_kty(val); self } - #[doc = "Change the `n` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_n()` instead."] pub fn n(&mut self, val: &str) -> &mut Self { - self.n_shim(val); + self.set_n(val); self } - #[doc = "Change the `oth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_oth()` instead."] pub fn oth(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.oth_shim(val); + self.set_oth(val); self } - #[doc = "Change the `p` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_p()` instead."] pub fn p(&mut self, val: &str) -> &mut Self { - self.p_shim(val); + self.set_p(val); self } - #[doc = "Change the `q` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_q()` instead."] pub fn q(&mut self, val: &str) -> &mut Self { - self.q_shim(val); + self.set_q(val); self } - #[doc = "Change the `qi` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_qi()` instead."] pub fn qi(&mut self, val: &str) -> &mut Self { - self.qi_shim(val); + self.set_qi(val); self } - #[doc = "Change the `use` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_use()` instead."] pub fn use_(&mut self, val: &str) -> &mut Self { - self.use__shim(val); + self.set_use(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: &str) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: &str) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyAlgorithm.rs b/crates/web-sys/src/features/gen_KeyAlgorithm.rs index 101595bb222..d7523f2da73 100644 --- a/crates/web-sys/src/features/gen_KeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_KeyAlgorithm.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] pub type KeyAlgorithm; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &KeyAlgorithm) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &KeyAlgorithm, val: &str); + pub fn set_name(this: &KeyAlgorithm, val: &str); } impl KeyAlgorithm { #[doc = "Construct a new `KeyAlgorithm`."] @@ -23,11 +31,9 @@ impl KeyAlgorithm { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyIdsInitData.rs b/crates/web-sys/src/features/gen_KeyIdsInitData.rs index 1f4d7767a4a..c05623d59d3 100644 --- a/crates/web-sys/src/features/gen_KeyIdsInitData.rs +++ b/crates/web-sys/src/features/gen_KeyIdsInitData.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] pub type KeyIdsInitData; + #[doc = "Get the `kids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] + #[wasm_bindgen(method, getter = "kids")] + pub fn get_kids(this: &KeyIdsInitData) -> ::js_sys::Array; + #[doc = "Change the `kids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] #[wasm_bindgen(method, setter = "kids")] - fn kids_shim(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); + pub fn set_kids(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); } impl KeyIdsInitData { #[doc = "Construct a new `KeyIdsInitData`."] @@ -23,11 +31,9 @@ impl KeyIdsInitData { ret.kids(kids); ret } - #[doc = "Change the `kids` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] + #[deprecated = "Use `set_kids()` instead."] pub fn kids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.kids_shim(val); + self.set_kids(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyboardEventInit.rs b/crates/web-sys/src/features/gen_KeyboardEventInit.rs index 3d777d4d7fb..a7701695929 100644 --- a/crates/web-sys/src/features/gen_KeyboardEventInit.rs +++ b/crates/web-sys/src/features/gen_KeyboardEventInit.rs @@ -10,59 +10,268 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub type KeyboardEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &KeyboardEventInit, val: bool); + pub fn set_bubbles(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &KeyboardEventInit, val: bool); + pub fn set_cancelable(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &KeyboardEventInit, val: bool); + pub fn set_composed(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &KeyboardEventInit, val: i32); + pub fn set_detail(this: &KeyboardEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &KeyboardEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &KeyboardEventInit, val: Option<&Window>); + pub fn set_view(this: &KeyboardEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &KeyboardEventInit, val: bool); + pub fn set_alt_key(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &KeyboardEventInit, val: bool); + pub fn set_ctrl_key(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &KeyboardEventInit, val: bool); + pub fn set_meta_key(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_fn(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_num_lock(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_os(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_symbol(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &KeyboardEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &KeyboardEventInit, val: bool); + pub fn set_shift_key(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `charCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "charCode")] + pub fn get_char_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `charCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "charCode")] - fn char_code_shim(this: &KeyboardEventInit, val: u32); + pub fn set_char_code(this: &KeyboardEventInit, val: u32); + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "code")] + pub fn get_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &KeyboardEventInit, val: &str); + pub fn set_code(this: &KeyboardEventInit, val: &str); + #[doc = "Get the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "isComposing")] + pub fn get_is_composing(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "isComposing")] - fn is_composing_shim(this: &KeyboardEventInit, val: bool); + pub fn set_is_composing(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "key")] + pub fn get_key(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &KeyboardEventInit, val: &str); + pub fn set_key(this: &KeyboardEventInit, val: &str); + #[doc = "Get the `keyCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "keyCode")] + pub fn get_key_code(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `keyCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "keyCode")] - fn key_code_shim(this: &KeyboardEventInit, val: u32); + pub fn set_key_code(this: &KeyboardEventInit, val: u32); + #[doc = "Get the `location` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "location")] + pub fn get_location(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `location` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "location")] - fn location_shim(this: &KeyboardEventInit, val: u32); + pub fn set_location(this: &KeyboardEventInit, val: u32); + #[doc = "Get the `repeat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "repeat")] + pub fn get_repeat(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `repeat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "repeat")] - fn repeat_shim(this: &KeyboardEventInit, val: bool); + pub fn set_repeat(this: &KeyboardEventInit, val: bool); + #[doc = "Get the `which` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[wasm_bindgen(method, getter = "which")] + pub fn get_which(this: &KeyboardEventInit) -> Option; + #[doc = "Change the `which` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] #[wasm_bindgen(method, setter = "which")] - fn which_shim(this: &KeyboardEventInit, val: u32); + pub fn set_which(this: &KeyboardEventInit, val: u32); } impl KeyboardEventInit { #[doc = "Construct a new `KeyboardEventInit`."] @@ -73,187 +282,135 @@ impl KeyboardEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `charCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_char_code()` instead."] pub fn char_code(&mut self, val: u32) -> &mut Self { - self.char_code_shim(val); + self.set_char_code(val); self } - #[doc = "Change the `code` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_code()` instead."] pub fn code(&mut self, val: &str) -> &mut Self { - self.code_shim(val); + self.set_code(val); self } - #[doc = "Change the `isComposing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_is_composing()` instead."] pub fn is_composing(&mut self, val: bool) -> &mut Self { - self.is_composing_shim(val); + self.set_is_composing(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: &str) -> &mut Self { - self.key_shim(val); + self.set_key(val); self } - #[doc = "Change the `keyCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_key_code()` instead."] pub fn key_code(&mut self, val: u32) -> &mut Self { - self.key_code_shim(val); + self.set_key_code(val); self } - #[doc = "Change the `location` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_location()` instead."] pub fn location(&mut self, val: u32) -> &mut Self { - self.location_shim(val); + self.set_location(val); self } - #[doc = "Change the `repeat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_repeat()` instead."] pub fn repeat(&mut self, val: bool) -> &mut Self { - self.repeat_shim(val); + self.set_repeat(val); self } - #[doc = "Change the `which` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + #[deprecated = "Use `set_which()` instead."] pub fn which(&mut self, val: u32) -> &mut Self { - self.which_shim(val); + self.set_which(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs index 7685c6af482..8777d27a77b 100644 --- a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs @@ -14,49 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type KeyframeAnimationOptions; - #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &KeyframeAnimationOptions, val: f64); - #[cfg(feature = "PlaybackDirection")] - #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &KeyframeAnimationOptions, val: PlaybackDirection); - #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &KeyframeAnimationOptions, val: &str); - #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &KeyframeAnimationOptions, val: f64); - #[cfg(feature = "FillMode")] - #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &KeyframeAnimationOptions, val: FillMode); - #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &KeyframeAnimationOptions, val: f64); - #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &KeyframeAnimationOptions, val: f64); - #[cfg(feature = "CompositeOperation")] - #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &KeyframeAnimationOptions, val: CompositeOperation); - #[cfg(feature = "IterationCompositeOperation")] - #[wasm_bindgen(method, setter = "iterationComposite")] - fn iteration_composite_shim(this: &KeyframeAnimationOptions, val: IterationCompositeOperation); - #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &KeyframeAnimationOptions, val: &str); - #[cfg(feature = "AnimationTimeline")] - #[wasm_bindgen(method, setter = "timeline")] - fn timeline_shim(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); -} -#[cfg(web_sys_unstable_apis)] -impl KeyframeAnimationOptions { - #[doc = "Construct a new `KeyframeAnimationOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `delay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `delay` field of this object."] #[doc = ""] @@ -64,10 +30,18 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); - self - } + #[wasm_bindgen(method, setter = "delay")] + pub fn set_delay(this: &KeyframeAnimationOptions, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PlaybackDirection")] #[doc = "Change the `direction` field of this object."] @@ -76,10 +50,17 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); - self - } + #[wasm_bindgen(method, setter = "direction")] + pub fn set_direction(this: &KeyframeAnimationOptions, val: PlaybackDirection); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &KeyframeAnimationOptions) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `duration` field of this object."] #[doc = ""] @@ -87,10 +68,17 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); - self - } + #[wasm_bindgen(method, setter = "duration")] + pub fn set_duration(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `easing` field of this object."] #[doc = ""] @@ -98,10 +86,17 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); - self - } + #[wasm_bindgen(method, setter = "easing")] + pub fn set_easing(this: &KeyframeAnimationOptions, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "endDelay")] + pub fn get_end_delay(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `endDelay` field of this object."] #[doc = ""] @@ -109,10 +104,18 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); - self - } + #[wasm_bindgen(method, setter = "endDelay")] + pub fn set_end_delay(this: &KeyframeAnimationOptions, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FillMode")] #[doc = "Change the `fill` field of this object."] @@ -121,10 +124,17 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); - self - } + #[wasm_bindgen(method, setter = "fill")] + pub fn set_fill(this: &KeyframeAnimationOptions, val: FillMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "iterationStart")] + pub fn get_iteration_start(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `iterationStart` field of this object."] #[doc = ""] @@ -132,10 +142,17 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); - self - } + #[wasm_bindgen(method, setter = "iterationStart")] + pub fn set_iteration_start(this: &KeyframeAnimationOptions, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `iterations` field of this object."] #[doc = ""] @@ -143,10 +160,18 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); - self - } + #[wasm_bindgen(method, setter = "iterations")] + pub fn set_iterations(this: &KeyframeAnimationOptions, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "CompositeOperation")] #[doc = "Change the `composite` field of this object."] @@ -155,10 +180,20 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); - self - } + #[wasm_bindgen(method, setter = "composite")] + pub fn set_composite(this: &KeyframeAnimationOptions, val: CompositeOperation); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Get the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "iterationComposite")] + pub fn get_iteration_composite( + this: &KeyframeAnimationOptions, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "IterationCompositeOperation")] #[doc = "Change the `iterationComposite` field of this object."] @@ -167,10 +202,20 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { - self.iteration_composite_shim(val); - self - } + #[wasm_bindgen(method, setter = "iterationComposite")] + pub fn set_iteration_composite( + this: &KeyframeAnimationOptions, + val: IterationCompositeOperation, + ); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `id` field of this object."] #[doc = ""] @@ -178,10 +223,18 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); - self - } + #[wasm_bindgen(method, setter = "id")] + pub fn set_id(this: &KeyframeAnimationOptions, val: &str); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AnimationTimeline")] + #[doc = "Get the `timeline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timeline")] + pub fn get_timeline(this: &KeyframeAnimationOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AnimationTimeline")] #[doc = "Change the `timeline` field of this object."] @@ -190,8 +243,97 @@ impl KeyframeAnimationOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "timeline")] + pub fn set_timeline(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); +} +#[cfg(web_sys_unstable_apis)] +impl KeyframeAnimationOptions { + #[doc = "Construct a new `KeyframeAnimationOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_delay()` instead."] + pub fn delay(&mut self, val: f64) -> &mut Self { + self.set_delay(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PlaybackDirection")] + #[deprecated = "Use `set_direction()` instead."] + pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { + self.set_direction(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_duration()` instead."] + pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_duration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_easing()` instead."] + pub fn easing(&mut self, val: &str) -> &mut Self { + self.set_easing(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_end_delay()` instead."] + pub fn end_delay(&mut self, val: f64) -> &mut Self { + self.set_end_delay(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FillMode")] + #[deprecated = "Use `set_fill()` instead."] + pub fn fill(&mut self, val: FillMode) -> &mut Self { + self.set_fill(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_iteration_start()` instead."] + pub fn iteration_start(&mut self, val: f64) -> &mut Self { + self.set_iteration_start(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_iterations()` instead."] + pub fn iterations(&mut self, val: f64) -> &mut Self { + self.set_iterations(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "CompositeOperation")] + #[deprecated = "Use `set_composite()` instead."] + pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { + self.set_composite(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "IterationCompositeOperation")] + #[deprecated = "Use `set_iteration_composite()` instead."] + pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { + self.set_iteration_composite(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_id()` instead."] + pub fn id(&mut self, val: &str) -> &mut Self { + self.set_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AnimationTimeline")] + #[deprecated = "Use `set_timeline()` instead."] pub fn timeline(&mut self, val: Option<&AnimationTimeline>) -> &mut Self { - self.timeline_shim(val); + self.set_timeline(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs index 94c35ecedd4..4424b0391e4 100644 --- a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs @@ -10,30 +10,116 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub type KeyframeEffectOptions; + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &KeyframeEffectOptions, val: f64); + pub fn set_delay(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &KeyframeEffectOptions) -> Option; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &KeyframeEffectOptions, val: PlaybackDirection); + pub fn set_direction(this: &KeyframeEffectOptions, val: PlaybackDirection); + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &KeyframeEffectOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &KeyframeEffectOptions, val: &str); + pub fn set_easing(this: &KeyframeEffectOptions, val: &str); + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "endDelay")] + pub fn get_end_delay(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &KeyframeEffectOptions, val: f64); + pub fn set_end_delay(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &KeyframeEffectOptions) -> Option; + #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &KeyframeEffectOptions, val: FillMode); + pub fn set_fill(this: &KeyframeEffectOptions, val: FillMode); + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "iterationStart")] + pub fn get_iteration_start(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &KeyframeEffectOptions, val: f64); + pub fn set_iteration_start(this: &KeyframeEffectOptions, val: f64); + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &KeyframeEffectOptions) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &KeyframeEffectOptions, val: f64); + pub fn set_iterations(this: &KeyframeEffectOptions, val: f64); #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "composite")] + pub fn get_composite(this: &KeyframeEffectOptions) -> Option; + #[cfg(feature = "CompositeOperation")] + #[doc = "Change the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &KeyframeEffectOptions, val: CompositeOperation); + pub fn set_composite(this: &KeyframeEffectOptions, val: CompositeOperation); #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Get the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] + #[wasm_bindgen(method, getter = "iterationComposite")] + pub fn get_iteration_composite( + this: &KeyframeEffectOptions, + ) -> Option; + #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Change the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] #[wasm_bindgen(method, setter = "iterationComposite")] - fn iteration_composite_shim(this: &KeyframeEffectOptions, val: IterationCompositeOperation); + pub fn set_iteration_composite(this: &KeyframeEffectOptions, val: IterationCompositeOperation); } impl KeyframeEffectOptions { #[doc = "Construct a new `KeyframeEffectOptions`."] @@ -44,78 +130,58 @@ impl KeyframeEffectOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations(val); self } #[cfg(feature = "CompositeOperation")] - #[doc = "Change the `composite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_composite()` instead."] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); + self.set_composite(val); self } #[cfg(feature = "IterationCompositeOperation")] - #[doc = "Change the `iterationComposite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] + #[deprecated = "Use `set_iteration_composite()` instead."] pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { - self.iteration_composite_shim(val); + self.set_iteration_composite(val); self } } diff --git a/crates/web-sys/src/features/gen_L10nElement.rs b/crates/web-sys/src/features/gen_L10nElement.rs index 0fd76d28bc7..38942a7baef 100644 --- a/crates/web-sys/src/features/gen_L10nElement.rs +++ b/crates/web-sys/src/features/gen_L10nElement.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub type L10nElement; + #[doc = "Get the `l10nArgs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "l10nArgs")] + pub fn get_l10n_args(this: &L10nElement) -> Option<::js_sys::Object>; + #[doc = "Change the `l10nArgs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nArgs")] - fn l10n_args_shim(this: &L10nElement, val: Option<&::js_sys::Object>); + pub fn set_l10n_args(this: &L10nElement, val: Option<&::js_sys::Object>); + #[doc = "Get the `l10nAttrs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "l10nAttrs")] + pub fn get_l10n_attrs(this: &L10nElement) -> Option; + #[doc = "Change the `l10nAttrs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nAttrs")] - fn l10n_attrs_shim(this: &L10nElement, val: Option<&str>); + pub fn set_l10n_attrs(this: &L10nElement, val: Option<&str>); + #[doc = "Get the `l10nId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "l10nId")] + pub fn get_l10n_id(this: &L10nElement) -> String; + #[doc = "Change the `l10nId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "l10nId")] - fn l10n_id_shim(this: &L10nElement, val: &str); + pub fn set_l10n_id(this: &L10nElement, val: &str); + #[doc = "Get the `localName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "localName")] + pub fn get_local_name(this: &L10nElement) -> String; + #[doc = "Change the `localName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "localName")] - fn local_name_shim(this: &L10nElement, val: &str); + pub fn set_local_name(this: &L10nElement, val: &str); + #[doc = "Get the `namespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "namespaceURI")] + pub fn get_namespace_uri(this: &L10nElement) -> String; + #[doc = "Change the `namespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "namespaceURI")] - fn namespace_uri_shim(this: &L10nElement, val: &str); + pub fn set_namespace_uri(this: &L10nElement, val: &str); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &L10nElement) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &L10nElement, val: Option<&str>); + pub fn set_type(this: &L10nElement, val: Option<&str>); } impl L10nElement { #[doc = "Construct a new `L10nElement`."] @@ -35,46 +83,34 @@ impl L10nElement { ret.namespace_uri(namespace_uri); ret } - #[doc = "Change the `l10nArgs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_args()` instead."] pub fn l10n_args(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.l10n_args_shim(val); + self.set_l10n_args(val); self } - #[doc = "Change the `l10nAttrs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_attrs()` instead."] pub fn l10n_attrs(&mut self, val: Option<&str>) -> &mut Self { - self.l10n_attrs_shim(val); + self.set_l10n_attrs(val); self } - #[doc = "Change the `l10nId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_l10n_id()` instead."] pub fn l10n_id(&mut self, val: &str) -> &mut Self { - self.l10n_id_shim(val); + self.set_l10n_id(val); self } - #[doc = "Change the `localName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_local_name()` instead."] pub fn local_name(&mut self, val: &str) -> &mut Self { - self.local_name_shim(val); + self.set_local_name(val); self } - #[doc = "Change the `namespaceURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_namespace_uri()` instead."] pub fn namespace_uri(&mut self, val: &str) -> &mut Self { - self.namespace_uri_shim(val); + self.set_namespace_uri(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: Option<&str>) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_L10nValue.rs b/crates/web-sys/src/features/gen_L10nValue.rs index 0dbf073485f..9c09c9aa438 100644 --- a/crates/web-sys/src/features/gen_L10nValue.rs +++ b/crates/web-sys/src/features/gen_L10nValue.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] pub type L10nValue; + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[wasm_bindgen(method, getter = "attributes")] + pub fn get_attributes(this: &L10nValue) -> Option<::js_sys::Array>; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &L10nValue, val: &::wasm_bindgen::JsValue); + pub fn set_attributes(this: &L10nValue, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &L10nValue) -> Option; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &L10nValue, val: Option<&str>); + pub fn set_value(this: &L10nValue, val: Option<&str>); } impl L10nValue { #[doc = "Construct a new `L10nValue`."] @@ -24,18 +40,14 @@ impl L10nValue { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.attributes_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_attributes(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: Option<&str>) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs index 82522003c88..2628c289394 100644 --- a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs +++ b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub type LifecycleCallbacks; + #[doc = "Get the `adoptedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[wasm_bindgen(method, getter = "adoptedCallback")] + pub fn get_adopted_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `adoptedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "adoptedCallback")] - fn adopted_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_adopted_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[doc = "Get the `attributeChangedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[wasm_bindgen(method, getter = "attributeChangedCallback")] + pub fn get_attribute_changed_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `attributeChangedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "attributeChangedCallback")] - fn attribute_changed_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_attribute_changed_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[doc = "Get the `connectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[wasm_bindgen(method, getter = "connectedCallback")] + pub fn get_connected_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `connectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "connectedCallback")] - fn connected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_connected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[doc = "Get the `disconnectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[wasm_bindgen(method, getter = "disconnectedCallback")] + pub fn get_disconnected_callback(this: &LifecycleCallbacks) -> Option<::js_sys::Function>; + #[doc = "Change the `disconnectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] #[wasm_bindgen(method, setter = "disconnectedCallback")] - fn disconnected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + pub fn set_disconnected_callback(this: &LifecycleCallbacks, val: &::js_sys::Function); } impl LifecycleCallbacks { #[doc = "Construct a new `LifecycleCallbacks`."] @@ -28,32 +60,24 @@ impl LifecycleCallbacks { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `adoptedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_adopted_callback()` instead."] pub fn adopted_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.adopted_callback_shim(val); + self.set_adopted_callback(val); self } - #[doc = "Change the `attributeChangedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_attribute_changed_callback()` instead."] pub fn attribute_changed_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.attribute_changed_callback_shim(val); + self.set_attribute_changed_callback(val); self } - #[doc = "Change the `connectedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_connected_callback()` instead."] pub fn connected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.connected_callback_shim(val); + self.set_connected_callback(val); self } - #[doc = "Change the `disconnectedCallback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + #[deprecated = "Use `set_disconnected_callback()` instead."] pub fn disconnected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.disconnected_callback_shim(val); + self.set_disconnected_callback(val); self } } diff --git a/crates/web-sys/src/features/gen_LocaleInfo.rs b/crates/web-sys/src/features/gen_LocaleInfo.rs index ba79aa77e67..b7c86104dd5 100644 --- a/crates/web-sys/src/features/gen_LocaleInfo.rs +++ b/crates/web-sys/src/features/gen_LocaleInfo.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] pub type LocaleInfo; + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &LocaleInfo) -> Option; + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &LocaleInfo, val: &str); + pub fn set_direction(this: &LocaleInfo, val: &str); + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[wasm_bindgen(method, getter = "locale")] + pub fn get_locale(this: &LocaleInfo) -> Option; + #[doc = "Change the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &LocaleInfo, val: &str); + pub fn set_locale(this: &LocaleInfo, val: &str); } impl LocaleInfo { #[doc = "Construct a new `LocaleInfo`."] @@ -24,18 +40,14 @@ impl LocaleInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: &str) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `locale` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + #[deprecated = "Use `set_locale()` instead."] pub fn locale(&mut self, val: &str) -> &mut Self { - self.locale_shim(val); + self.set_locale(val); self } } diff --git a/crates/web-sys/src/features/gen_LockInfo.rs b/crates/web-sys/src/features/gen_LockInfo.rs index 0c7112ddc24..aa37143fa48 100644 --- a/crates/web-sys/src/features/gen_LockInfo.rs +++ b/crates/web-sys/src/features/gen_LockInfo.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockInfo; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "clientId")] + pub fn get_client_id(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clientId")] - fn client_id_shim(this: &LockInfo, val: &str); + pub fn set_client_id(this: &LockInfo, val: &str); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &LockInfo, val: LockMode); + pub fn set_mode(this: &LockInfo, val: LockMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &LockInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &LockInfo, val: &str); + pub fn set_name(this: &LockInfo, val: &str); } #[cfg(web_sys_unstable_apis)] impl LockInfo { @@ -36,37 +85,22 @@ impl LockInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clientId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_client_id()` instead."] pub fn client_id(&mut self, val: &str) -> &mut Self { - self.client_id_shim(val); + self.set_client_id(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: LockMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs index a6b6ed20ddc..eaf27c0dbbe 100644 --- a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs +++ b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockManagerSnapshot; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `held` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "held")] + pub fn get_held(this: &LockManagerSnapshot) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `held` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "held")] - fn held_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + pub fn set_held(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `pending` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "pending")] + pub fn get_pending(this: &LockManagerSnapshot) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `pending` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "pending")] - fn pending_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + pub fn set_pending(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl LockManagerSnapshot { @@ -33,25 +65,15 @@ impl LockManagerSnapshot { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `held` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_held()` instead."] pub fn held(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.held_shim(val); + self.set_held(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `pending` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_pending()` instead."] pub fn pending(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.pending_shim(val); + self.set_pending(val); self } } diff --git a/crates/web-sys/src/features/gen_LockOptions.rs b/crates/web-sys/src/features/gen_LockOptions.rs index 8b450d2645c..3f023869c94 100644 --- a/crates/web-sys/src/features/gen_LockOptions.rs +++ b/crates/web-sys/src/features/gen_LockOptions.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockOptions; - #[wasm_bindgen(method, setter = "ifAvailable")] - fn if_available_shim(this: &LockOptions, val: bool); - #[cfg(feature = "LockMode")] - #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &LockOptions, val: LockMode); - #[cfg(feature = "AbortSignal")] - #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &LockOptions, val: &AbortSignal); - #[wasm_bindgen(method, setter = "steal")] - fn steal_shim(this: &LockOptions, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl LockOptions { - #[doc = "Construct a new `LockOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ifAvailable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "ifAvailable")] + pub fn get_if_available(this: &LockOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `ifAvailable` field of this object."] #[doc = ""] @@ -45,10 +30,18 @@ impl LockOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn if_available(&mut self, val: bool) -> &mut Self { - self.if_available_shim(val); - self - } + #[wasm_bindgen(method, setter = "ifAvailable")] + pub fn set_if_available(this: &LockOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockMode`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &LockOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LockMode")] #[doc = "Change the `mode` field of this object."] @@ -57,10 +50,18 @@ impl LockOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mode(&mut self, val: LockMode) -> &mut Self { - self.mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "mode")] + pub fn set_mode(this: &LockOptions, val: LockMode); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &LockOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] #[doc = "Change the `signal` field of this object."] @@ -69,10 +70,17 @@ impl LockOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); - self - } + #[wasm_bindgen(method, setter = "signal")] + pub fn set_signal(this: &LockOptions, val: &AbortSignal); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `steal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "steal")] + pub fn get_steal(this: &LockOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `steal` field of this object."] #[doc = ""] @@ -80,8 +88,46 @@ impl LockOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "steal")] + pub fn set_steal(this: &LockOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl LockOptions { + #[doc = "Construct a new `LockOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_if_available()` instead."] + pub fn if_available(&mut self, val: bool) -> &mut Self { + self.set_if_available(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + #[deprecated = "Use `set_mode()` instead."] + pub fn mode(&mut self, val: LockMode) -> &mut Self { + self.set_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[deprecated = "Use `set_signal()` instead."] + pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { + self.set_signal(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_steal()` instead."] pub fn steal(&mut self, val: bool) -> &mut Self { - self.steal_shim(val); + self.set_steal(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaConfiguration.rs b/crates/web-sys/src/features/gen_MediaConfiguration.rs index 5214880c65c..57c9d39f59f 100644 --- a/crates/web-sys/src/features/gen_MediaConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaConfiguration.rs @@ -11,11 +11,29 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`*"] pub type MediaConfiguration; #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] + #[wasm_bindgen(method, getter = "audio")] + pub fn get_audio(this: &MediaConfiguration) -> Option; + #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "video")] + pub fn get_video(this: &MediaConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaConfiguration, val: &VideoConfiguration); } impl MediaConfiguration { #[doc = "Construct a new `MediaConfiguration`."] @@ -27,19 +45,15 @@ impl MediaConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs index 056b56bda30..297dd25ef9c 100644 --- a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs @@ -11,14 +11,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`*"] pub type MediaDecodingConfiguration; #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] + #[wasm_bindgen(method, getter = "audio")] + pub fn get_audio(this: &MediaDecodingConfiguration) -> Option; + #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaDecodingConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaDecodingConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "video")] + pub fn get_video(this: &MediaDecodingConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaDecodingConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaDecodingConfiguration, val: &VideoConfiguration); #[cfg(feature = "MediaDecodingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &MediaDecodingConfiguration) -> MediaDecodingType; + #[cfg(feature = "MediaDecodingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaDecodingConfiguration, val: MediaDecodingType); + pub fn set_type(this: &MediaDecodingConfiguration, val: MediaDecodingType); } impl MediaDecodingConfiguration { #[cfg(feature = "MediaDecodingType")] @@ -32,27 +59,21 @@ impl MediaDecodingConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video(val); self } #[cfg(feature = "MediaDecodingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: MediaDecodingType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs index c13381b70d2..5e5eb4b2621 100644 --- a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaElementAudioSourceOptions`*"] pub type MediaElementAudioSourceOptions; #[cfg(feature = "HtmlMediaElement")] + #[doc = "Get the `mediaElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] + #[wasm_bindgen(method, getter = "mediaElement")] + pub fn get_media_element(this: &MediaElementAudioSourceOptions) -> HtmlMediaElement; + #[cfg(feature = "HtmlMediaElement")] + #[doc = "Change the `mediaElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] #[wasm_bindgen(method, setter = "mediaElement")] - fn media_element_shim(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); + pub fn set_media_element(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); } impl MediaElementAudioSourceOptions { #[cfg(feature = "HtmlMediaElement")] @@ -26,11 +35,9 @@ impl MediaElementAudioSourceOptions { ret } #[cfg(feature = "HtmlMediaElement")] - #[doc = "Change the `mediaElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] + #[deprecated = "Use `set_media_element()` instead."] pub fn media_element(&mut self, val: &HtmlMediaElement) -> &mut Self { - self.media_element_shim(val); + self.set_media_element(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs index eafa1733fc4..1880ab1d8d3 100644 --- a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs @@ -11,14 +11,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`*"] pub type MediaEncodingConfiguration; #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] + #[wasm_bindgen(method, getter = "audio")] + pub fn get_audio(this: &MediaEncodingConfiguration) -> Option; + #[cfg(feature = "AudioConfiguration")] + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaEncodingConfiguration, val: &AudioConfiguration); + pub fn set_audio(this: &MediaEncodingConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "video")] + pub fn get_video(this: &MediaEncodingConfiguration) -> Option; #[cfg(feature = "VideoConfiguration")] + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaEncodingConfiguration, val: &VideoConfiguration); + pub fn set_video(this: &MediaEncodingConfiguration, val: &VideoConfiguration); #[cfg(feature = "MediaEncodingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &MediaEncodingConfiguration) -> MediaEncodingType; + #[cfg(feature = "MediaEncodingType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaEncodingConfiguration, val: MediaEncodingType); + pub fn set_type(this: &MediaEncodingConfiguration, val: MediaEncodingType); } impl MediaEncodingConfiguration { #[cfg(feature = "MediaEncodingType")] @@ -32,27 +59,21 @@ impl MediaEncodingConfiguration { ret } #[cfg(feature = "AudioConfiguration")] - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio(val); self } #[cfg(feature = "VideoConfiguration")] - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video(val); self } #[cfg(feature = "MediaEncodingType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: MediaEncodingType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaImage.rs b/crates/web-sys/src/features/gen_MediaImage.rs index 779f4419ecb..151349e85ea 100644 --- a/crates/web-sys/src/features/gen_MediaImage.rs +++ b/crates/web-sys/src/features/gen_MediaImage.rs @@ -14,12 +14,60 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaImage; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sizes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sizes")] + pub fn get_sizes(this: &MediaImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sizes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sizes")] - fn sizes_shim(this: &MediaImage, val: &str); + pub fn set_sizes(this: &MediaImage, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "src")] + pub fn get_src(this: &MediaImage) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "src")] - fn src_shim(this: &MediaImage, val: &str); + pub fn set_src(this: &MediaImage, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &MediaImage) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaImage, val: &str); + pub fn set_type(this: &MediaImage, val: &str); } #[cfg(web_sys_unstable_apis)] impl MediaImage { @@ -36,36 +84,21 @@ impl MediaImage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sizes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_sizes()` instead."] pub fn sizes(&mut self, val: &str) -> &mut Self { - self.sizes_shim(val); + self.set_sizes(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `src` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src()` instead."] pub fn src(&mut self, val: &str) -> &mut Self { - self.src_shim(val); + self.set_src(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs index b5d349fa116..8b64ac9ada6 100644 --- a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub type MediaKeyMessageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_bubbles(this: &MediaKeyMessageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_cancelable(this: &MediaKeyMessageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaKeyMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaKeyMessageEventInit, val: bool); + pub fn set_composed(this: &MediaKeyMessageEventInit, val: bool); + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[wasm_bindgen(method, getter = "message")] + pub fn get_message(this: &MediaKeyMessageEventInit) -> ::js_sys::ArrayBuffer; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); + pub fn set_message(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); #[cfg(feature = "MediaKeyMessageType")] + #[doc = "Get the `messageType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] + #[wasm_bindgen(method, getter = "messageType")] + pub fn get_message_type(this: &MediaKeyMessageEventInit) -> MediaKeyMessageType; + #[cfg(feature = "MediaKeyMessageType")] + #[doc = "Change the `messageType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] #[wasm_bindgen(method, setter = "messageType")] - fn message_type_shim(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); + pub fn set_message_type(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); } impl MediaKeyMessageEventInit { #[cfg(feature = "MediaKeyMessageType")] @@ -34,40 +75,30 @@ impl MediaKeyMessageEventInit { ret.message_type(message_type); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &::js_sys::ArrayBuffer) -> &mut Self { - self.message_shim(val); + self.set_message(val); self } #[cfg(feature = "MediaKeyMessageType")] - #[doc = "Change the `messageType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] + #[deprecated = "Use `set_message_type()` instead."] pub fn message_type(&mut self, val: MediaKeyMessageType) -> &mut Self { - self.message_type_shim(val); + self.set_message_type(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs index f723838a4c8..33419e081c3 100644 --- a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub type MediaKeyNeededEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_bubbles(this: &MediaKeyNeededEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_cancelable(this: &MediaKeyNeededEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaKeyNeededEventInit, val: bool); + pub fn set_composed(this: &MediaKeyNeededEventInit, val: bool); + #[doc = "Get the `initData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[wasm_bindgen(method, getter = "initData")] + pub fn get_init_data(this: &MediaKeyNeededEventInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `initData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "initData")] - fn init_data_shim(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_init_data(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); + #[doc = "Get the `initDataType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[wasm_bindgen(method, getter = "initDataType")] + pub fn get_init_data_type(this: &MediaKeyNeededEventInit) -> Option; + #[doc = "Change the `initDataType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] #[wasm_bindgen(method, setter = "initDataType")] - fn init_data_type_shim(this: &MediaKeyNeededEventInit, val: &str); + pub fn set_init_data_type(this: &MediaKeyNeededEventInit, val: &str); } impl MediaKeyNeededEventInit { #[doc = "Construct a new `MediaKeyNeededEventInit`."] @@ -30,39 +70,29 @@ impl MediaKeyNeededEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `initData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_init_data()` instead."] pub fn init_data(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.init_data_shim(val); + self.set_init_data(val); self } - #[doc = "Change the `initDataType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + #[deprecated = "Use `set_init_data_type()` instead."] pub fn init_data_type(&mut self, val: &str) -> &mut Self { - self.init_data_type_shim(val); + self.set_init_data_type(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs index 189ffb73a60..e110b3e1ec1 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs @@ -10,22 +10,92 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub type MediaKeySystemConfiguration; + #[doc = "Get the `audioCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[wasm_bindgen(method, getter = "audioCapabilities")] + pub fn get_audio_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `audioCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "audioCapabilities")] - fn audio_capabilities_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_audio_capabilities( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); + #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Get the `distinctiveIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[wasm_bindgen(method, getter = "distinctiveIdentifier")] + pub fn get_distinctive_identifier( + this: &MediaKeySystemConfiguration, + ) -> Option; #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Change the `distinctiveIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] #[wasm_bindgen(method, setter = "distinctiveIdentifier")] - fn distinctive_identifier_shim(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + pub fn set_distinctive_identifier( + this: &MediaKeySystemConfiguration, + val: MediaKeysRequirement, + ); + #[doc = "Get the `initDataTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[wasm_bindgen(method, getter = "initDataTypes")] + pub fn get_init_data_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `initDataTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "initDataTypes")] - fn init_data_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_init_data_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &MediaKeySystemConfiguration) -> Option; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &MediaKeySystemConfiguration, val: &str); + pub fn set_label(this: &MediaKeySystemConfiguration, val: &str); + #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Get the `persistentState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[wasm_bindgen(method, getter = "persistentState")] + pub fn get_persistent_state(this: &MediaKeySystemConfiguration) + -> Option; #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Change the `persistentState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] #[wasm_bindgen(method, setter = "persistentState")] - fn persistent_state_shim(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + pub fn set_persistent_state(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + #[doc = "Get the `sessionTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[wasm_bindgen(method, getter = "sessionTypes")] + pub fn get_session_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `sessionTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "sessionTypes")] - fn session_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_session_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `videoCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[wasm_bindgen(method, getter = "videoCapabilities")] + pub fn get_video_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `videoCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] #[wasm_bindgen(method, setter = "videoCapabilities")] - fn video_capabilities_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_video_capabilities( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); } impl MediaKeySystemConfiguration { #[doc = "Construct a new `MediaKeySystemConfiguration`."] @@ -36,55 +106,41 @@ impl MediaKeySystemConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audioCapabilities` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_audio_capabilities()` instead."] pub fn audio_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_capabilities_shim(val); + self.set_audio_capabilities(val); self } #[cfg(feature = "MediaKeysRequirement")] - #[doc = "Change the `distinctiveIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[deprecated = "Use `set_distinctive_identifier()` instead."] pub fn distinctive_identifier(&mut self, val: MediaKeysRequirement) -> &mut Self { - self.distinctive_identifier_shim(val); + self.set_distinctive_identifier(val); self } - #[doc = "Change the `initDataTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_init_data_types()` instead."] pub fn init_data_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.init_data_types_shim(val); + self.set_init_data_types(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } #[cfg(feature = "MediaKeysRequirement")] - #[doc = "Change the `persistentState` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + #[deprecated = "Use `set_persistent_state()` instead."] pub fn persistent_state(&mut self, val: MediaKeysRequirement) -> &mut Self { - self.persistent_state_shim(val); + self.set_persistent_state(val); self } - #[doc = "Change the `sessionTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_session_types()` instead."] pub fn session_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.session_types_shim(val); + self.set_session_types(val); self } - #[doc = "Change the `videoCapabilities` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + #[deprecated = "Use `set_video_capabilities()` instead."] pub fn video_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_capabilities_shim(val); + self.set_video_capabilities(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs index 6d4e840e0fb..7740ba74e30 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] pub type MediaKeySystemMediaCapability; + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[wasm_bindgen(method, getter = "contentType")] + pub fn get_content_type(this: &MediaKeySystemMediaCapability) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &MediaKeySystemMediaCapability, val: &str); + pub fn set_content_type(this: &MediaKeySystemMediaCapability, val: &str); + #[doc = "Get the `robustness` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[wasm_bindgen(method, getter = "robustness")] + pub fn get_robustness(this: &MediaKeySystemMediaCapability) -> Option; + #[doc = "Change the `robustness` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] #[wasm_bindgen(method, setter = "robustness")] - fn robustness_shim(this: &MediaKeySystemMediaCapability, val: &str); + pub fn set_robustness(this: &MediaKeySystemMediaCapability, val: &str); } impl MediaKeySystemMediaCapability { #[doc = "Construct a new `MediaKeySystemMediaCapability`."] @@ -24,18 +40,14 @@ impl MediaKeySystemMediaCapability { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type(val); self } - #[doc = "Change the `robustness` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + #[deprecated = "Use `set_robustness()` instead."] pub fn robustness(&mut self, val: &str) -> &mut Self { - self.robustness_shim(val); + self.set_robustness(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs index de6f010e296..26f5b184200 100644 --- a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs +++ b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] pub type MediaKeysPolicy; + #[doc = "Get the `minHdcpVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] + #[wasm_bindgen(method, getter = "minHdcpVersion")] + pub fn get_min_hdcp_version(this: &MediaKeysPolicy) -> Option; + #[doc = "Change the `minHdcpVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] #[wasm_bindgen(method, setter = "minHdcpVersion")] - fn min_hdcp_version_shim(this: &MediaKeysPolicy, val: &str); + pub fn set_min_hdcp_version(this: &MediaKeysPolicy, val: &str); } impl MediaKeysPolicy { #[doc = "Construct a new `MediaKeysPolicy`."] @@ -22,11 +30,9 @@ impl MediaKeysPolicy { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `minHdcpVersion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] + #[deprecated = "Use `set_min_hdcp_version()` instead."] pub fn min_hdcp_version(&mut self, val: &str) -> &mut Self { - self.min_hdcp_version_shim(val); + self.set_min_hdcp_version(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaMetadataInit.rs b/crates/web-sys/src/features/gen_MediaMetadataInit.rs index 91fb637fb19..f2deaff2ec3 100644 --- a/crates/web-sys/src/features/gen_MediaMetadataInit.rs +++ b/crates/web-sys/src/features/gen_MediaMetadataInit.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaMetadataInit; - #[wasm_bindgen(method, setter = "album")] - fn album_shim(this: &MediaMetadataInit, val: &str); - #[wasm_bindgen(method, setter = "artist")] - fn artist_shim(this: &MediaMetadataInit, val: &str); - #[wasm_bindgen(method, setter = "artwork")] - fn artwork_shim(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &MediaMetadataInit, val: &str); -} -#[cfg(web_sys_unstable_apis)] -impl MediaMetadataInit { - #[doc = "Construct a new `MediaMetadataInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `album` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "album")] + pub fn get_album(this: &MediaMetadataInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `album` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl MediaMetadataInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn album(&mut self, val: &str) -> &mut Self { - self.album_shim(val); - self - } + #[wasm_bindgen(method, setter = "album")] + pub fn set_album(this: &MediaMetadataInit, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `artist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "artist")] + pub fn get_artist(this: &MediaMetadataInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `artist` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl MediaMetadataInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn artist(&mut self, val: &str) -> &mut Self { - self.artist_shim(val); - self - } + #[wasm_bindgen(method, setter = "artist")] + pub fn set_artist(this: &MediaMetadataInit, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `artwork` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "artwork")] + pub fn get_artwork(this: &MediaMetadataInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `artwork` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl MediaMetadataInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn artwork(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.artwork_shim(val); - self - } + #[wasm_bindgen(method, setter = "artwork")] + pub fn set_artwork(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "title")] + pub fn get_title(this: &MediaMetadataInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `title` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl MediaMetadataInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "title")] + pub fn set_title(this: &MediaMetadataInit, val: &str); +} +#[cfg(web_sys_unstable_apis)] +impl MediaMetadataInit { + #[doc = "Construct a new `MediaMetadataInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_album()` instead."] + pub fn album(&mut self, val: &str) -> &mut Self { + self.set_album(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_artist()` instead."] + pub fn artist(&mut self, val: &str) -> &mut Self { + self.set_artist(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_artwork()` instead."] + pub fn artwork(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_artwork(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaPositionState.rs b/crates/web-sys/src/features/gen_MediaPositionState.rs index 2cb0437b6cd..b381f380ad4 100644 --- a/crates/web-sys/src/features/gen_MediaPositionState.rs +++ b/crates/web-sys/src/features/gen_MediaPositionState.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaPositionState; - #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &MediaPositionState, val: f64); - #[wasm_bindgen(method, setter = "playbackRate")] - fn playback_rate_shim(this: &MediaPositionState, val: f64); - #[wasm_bindgen(method, setter = "position")] - fn position_shim(this: &MediaPositionState, val: f64); -} -#[cfg(web_sys_unstable_apis)] -impl MediaPositionState { - #[doc = "Construct a new `MediaPositionState`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &MediaPositionState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `duration` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl MediaPositionState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); - self - } + #[wasm_bindgen(method, setter = "duration")] + pub fn set_duration(this: &MediaPositionState, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "playbackRate")] + pub fn get_playback_rate(this: &MediaPositionState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `playbackRate` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl MediaPositionState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn playback_rate(&mut self, val: f64) -> &mut Self { - self.playback_rate_shim(val); - self - } + #[wasm_bindgen(method, setter = "playbackRate")] + pub fn set_playback_rate(this: &MediaPositionState, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "position")] + pub fn get_position(this: &MediaPositionState) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `position` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl MediaPositionState { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "position")] + pub fn set_position(this: &MediaPositionState, val: f64); +} +#[cfg(web_sys_unstable_apis)] +impl MediaPositionState { + #[doc = "Construct a new `MediaPositionState`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_duration()` instead."] + pub fn duration(&mut self, val: f64) -> &mut Self { + self.set_duration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_playback_rate()` instead."] + pub fn playback_rate(&mut self, val: f64) -> &mut Self { + self.set_playback_rate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_position()` instead."] pub fn position(&mut self, val: f64) -> &mut Self { - self.position_shim(val); + self.set_position(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs index 842841ed7d9..b656e13b75a 100644 --- a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub type MediaQueryListEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaQueryListEventInit, val: bool); + pub fn set_bubbles(this: &MediaQueryListEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaQueryListEventInit, val: bool); + pub fn set_cancelable(this: &MediaQueryListEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaQueryListEventInit, val: bool); + pub fn set_composed(this: &MediaQueryListEventInit, val: bool); + #[doc = "Get the `matches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[wasm_bindgen(method, getter = "matches")] + pub fn get_matches(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `matches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "matches")] - fn matches_shim(this: &MediaQueryListEventInit, val: bool); + pub fn set_matches(this: &MediaQueryListEventInit, val: bool); + #[doc = "Get the `media` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[wasm_bindgen(method, getter = "media")] + pub fn get_media(this: &MediaQueryListEventInit) -> Option; + #[doc = "Change the `media` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] #[wasm_bindgen(method, setter = "media")] - fn media_shim(this: &MediaQueryListEventInit, val: &str); + pub fn set_media(this: &MediaQueryListEventInit, val: &str); } impl MediaQueryListEventInit { #[doc = "Construct a new `MediaQueryListEventInit`."] @@ -30,39 +70,29 @@ impl MediaQueryListEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `matches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_matches()` instead."] pub fn matches(&mut self, val: bool) -> &mut Self { - self.matches_shim(val); + self.set_matches(val); self } - #[doc = "Change the `media` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + #[deprecated = "Use `set_media()` instead."] pub fn media(&mut self, val: &str) -> &mut Self { - self.media_shim(val); + self.set_media(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs index bd0cee69550..0c853852267 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] pub type MediaRecorderErrorEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_bubbles(this: &MediaRecorderErrorEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_cancelable(this: &MediaRecorderErrorEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaRecorderErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaRecorderErrorEventInit, val: bool); + pub fn set_composed(this: &MediaRecorderErrorEventInit, val: bool); #[cfg(feature = "DomException")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &MediaRecorderErrorEventInit) -> DomException; + #[cfg(feature = "DomException")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &MediaRecorderErrorEventInit, val: &DomException); + pub fn set_error(this: &MediaRecorderErrorEventInit, val: &DomException); } impl MediaRecorderErrorEventInit { #[cfg(feature = "DomException")] @@ -31,33 +64,25 @@ impl MediaRecorderErrorEventInit { ret.error(error); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "DomException")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &DomException) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs index c2b2d199293..2cadbaa05ac 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub type MediaRecorderOptions; + #[doc = "Get the `audioBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[wasm_bindgen(method, getter = "audioBitsPerSecond")] + pub fn get_audio_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `audioBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "audioBitsPerSecond")] - fn audio_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + pub fn set_audio_bits_per_second(this: &MediaRecorderOptions, val: u32); + #[doc = "Get the `bitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[wasm_bindgen(method, getter = "bitsPerSecond")] + pub fn get_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `bitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "bitsPerSecond")] - fn bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + pub fn set_bits_per_second(this: &MediaRecorderOptions, val: u32); + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[wasm_bindgen(method, getter = "mimeType")] + pub fn get_mime_type(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &MediaRecorderOptions, val: &str); + pub fn set_mime_type(this: &MediaRecorderOptions, val: &str); + #[doc = "Get the `videoBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[wasm_bindgen(method, getter = "videoBitsPerSecond")] + pub fn get_video_bits_per_second(this: &MediaRecorderOptions) -> Option; + #[doc = "Change the `videoBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] #[wasm_bindgen(method, setter = "videoBitsPerSecond")] - fn video_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + pub fn set_video_bits_per_second(this: &MediaRecorderOptions, val: u32); } impl MediaRecorderOptions { #[doc = "Construct a new `MediaRecorderOptions`."] @@ -28,32 +60,24 @@ impl MediaRecorderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audioBitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_audio_bits_per_second()` instead."] pub fn audio_bits_per_second(&mut self, val: u32) -> &mut Self { - self.audio_bits_per_second_shim(val); + self.set_audio_bits_per_second(val); self } - #[doc = "Change the `bitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_bits_per_second()` instead."] pub fn bits_per_second(&mut self, val: u32) -> &mut Self { - self.bits_per_second_shim(val); + self.set_bits_per_second(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type(val); self } - #[doc = "Change the `videoBitsPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + #[deprecated = "Use `set_video_bits_per_second()` instead."] pub fn video_bits_per_second(&mut self, val: u32) -> &mut Self { - self.video_bits_per_second_shim(val); + self.set_video_bits_per_second(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs index 45cde7e9664..69cc21f6087 100644 --- a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs +++ b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs @@ -14,31 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaSessionActionDetails; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaSessionAction")] - #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &MediaSessionActionDetails, val: MediaSessionAction); - #[wasm_bindgen(method, setter = "fastSeek")] - fn fast_seek_shim(this: &MediaSessionActionDetails, val: Option); - #[wasm_bindgen(method, setter = "seekOffset")] - fn seek_offset_shim(this: &MediaSessionActionDetails, val: Option); - #[wasm_bindgen(method, setter = "seekTime")] - fn seek_time_shim(this: &MediaSessionActionDetails, val: Option); -} -#[cfg(web_sys_unstable_apis)] -impl MediaSessionActionDetails { - #[cfg(feature = "MediaSessionAction")] - #[doc = "Construct a new `MediaSessionActionDetails`."] + #[doc = "Get the `action` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(action: MediaSessionAction) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.action(action); - ret - } + #[wasm_bindgen(method, getter = "action")] + pub fn get_action(this: &MediaSessionActionDetails) -> MediaSessionAction; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaSessionAction")] #[doc = "Change the `action` field of this object."] @@ -47,10 +32,17 @@ impl MediaSessionActionDetails { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn action(&mut self, val: MediaSessionAction) -> &mut Self { - self.action_shim(val); - self - } + #[wasm_bindgen(method, setter = "action")] + pub fn set_action(this: &MediaSessionActionDetails, val: MediaSessionAction); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `fastSeek` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "fastSeek")] + pub fn get_fast_seek(this: &MediaSessionActionDetails) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `fastSeek` field of this object."] #[doc = ""] @@ -58,10 +50,17 @@ impl MediaSessionActionDetails { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn fast_seek(&mut self, val: Option) -> &mut Self { - self.fast_seek_shim(val); - self - } + #[wasm_bindgen(method, setter = "fastSeek")] + pub fn set_fast_seek(this: &MediaSessionActionDetails, val: Option); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `seekOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "seekOffset")] + pub fn get_seek_offset(this: &MediaSessionActionDetails) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `seekOffset` field of this object."] #[doc = ""] @@ -69,10 +68,17 @@ impl MediaSessionActionDetails { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn seek_offset(&mut self, val: Option) -> &mut Self { - self.seek_offset_shim(val); - self - } + #[wasm_bindgen(method, setter = "seekOffset")] + pub fn set_seek_offset(this: &MediaSessionActionDetails, val: Option); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `seekTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "seekTime")] + pub fn get_seek_time(this: &MediaSessionActionDetails) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `seekTime` field of this object."] #[doc = ""] @@ -80,8 +86,47 @@ impl MediaSessionActionDetails { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "seekTime")] + pub fn set_seek_time(this: &MediaSessionActionDetails, val: Option); +} +#[cfg(web_sys_unstable_apis)] +impl MediaSessionActionDetails { + #[cfg(feature = "MediaSessionAction")] + #[doc = "Construct a new `MediaSessionActionDetails`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(action: MediaSessionAction) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.action(action); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaSessionAction")] + #[deprecated = "Use `set_action()` instead."] + pub fn action(&mut self, val: MediaSessionAction) -> &mut Self { + self.set_action(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_fast_seek()` instead."] + pub fn fast_seek(&mut self, val: Option) -> &mut Self { + self.set_fast_seek(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_seek_offset()` instead."] + pub fn seek_offset(&mut self, val: Option) -> &mut Self { + self.set_seek_offset(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_seek_time()` instead."] pub fn seek_time(&mut self, val: Option) -> &mut Self { - self.seek_time_shim(val); + self.set_seek_time(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs index 633826b3f34..891dbe1e355 100644 --- a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaStreamAudioSourceOptions`*"] pub type MediaStreamAudioSourceOptions; #[cfg(feature = "MediaStream")] + #[doc = "Get the `mediaStream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] + #[wasm_bindgen(method, getter = "mediaStream")] + pub fn get_media_stream(this: &MediaStreamAudioSourceOptions) -> MediaStream; + #[cfg(feature = "MediaStream")] + #[doc = "Change the `mediaStream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] #[wasm_bindgen(method, setter = "mediaStream")] - fn media_stream_shim(this: &MediaStreamAudioSourceOptions, val: &MediaStream); + pub fn set_media_stream(this: &MediaStreamAudioSourceOptions, val: &MediaStream); } impl MediaStreamAudioSourceOptions { #[cfg(feature = "MediaStream")] @@ -26,11 +35,9 @@ impl MediaStreamAudioSourceOptions { ret } #[cfg(feature = "MediaStream")] - #[doc = "Change the `mediaStream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] + #[deprecated = "Use `set_media_stream()` instead."] pub fn media_stream(&mut self, val: &MediaStream) -> &mut Self { - self.media_stream_shim(val); + self.set_media_stream(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs index 9533a444d03..0a666f793b5 100644 --- a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub type MediaStreamConstraints; + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "audio")] + pub fn get_audio(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_audio(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `fake` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "fake")] + pub fn get_fake(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `fake` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "fake")] - fn fake_shim(this: &MediaStreamConstraints, val: bool); + pub fn set_fake(this: &MediaStreamConstraints, val: bool); + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "peerIdentity")] + pub fn get_peer_identity(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &MediaStreamConstraints, val: Option<&str>); + pub fn set_peer_identity(this: &MediaStreamConstraints, val: Option<&str>); + #[doc = "Get the `picture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "picture")] + pub fn get_picture(this: &MediaStreamConstraints) -> Option; + #[doc = "Change the `picture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "picture")] - fn picture_shim(this: &MediaStreamConstraints, val: bool); + pub fn set_picture(this: &MediaStreamConstraints, val: bool); + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[wasm_bindgen(method, getter = "video")] + pub fn get_video(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_video(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); } impl MediaStreamConstraints { #[doc = "Construct a new `MediaStreamConstraints`."] @@ -30,39 +70,29 @@ impl MediaStreamConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `audio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_audio()` instead."] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_shim(val); + self.set_audio(val); self } - #[doc = "Change the `fake` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_fake()` instead."] pub fn fake(&mut self, val: bool) -> &mut Self { - self.fake_shim(val); + self.set_fake(val); self } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity(val); self } - #[doc = "Change the `picture` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_picture()` instead."] pub fn picture(&mut self, val: bool) -> &mut Self { - self.picture_shim(val); + self.set_picture(val); self } - #[doc = "Change the `video` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + #[deprecated = "Use `set_video()` instead."] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_shim(val); + self.set_video(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs index 82458dfd60c..0bc44a3cd3d 100644 --- a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] pub type MediaStreamEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaStreamEventInit, val: bool); + pub fn set_bubbles(this: &MediaStreamEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaStreamEventInit, val: bool); + pub fn set_cancelable(this: &MediaStreamEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaStreamEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaStreamEventInit, val: bool); + pub fn set_composed(this: &MediaStreamEventInit, val: bool); #[cfg(feature = "MediaStream")] + #[doc = "Get the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] + #[wasm_bindgen(method, getter = "stream")] + pub fn get_stream(this: &MediaStreamEventInit) -> Option; + #[cfg(feature = "MediaStream")] + #[doc = "Change the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] #[wasm_bindgen(method, setter = "stream")] - fn stream_shim(this: &MediaStreamEventInit, val: Option<&MediaStream>); + pub fn set_stream(this: &MediaStreamEventInit, val: Option<&MediaStream>); } impl MediaStreamEventInit { #[doc = "Construct a new `MediaStreamEventInit`."] @@ -29,33 +62,25 @@ impl MediaStreamEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "MediaStream")] - #[doc = "Change the `stream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] + #[deprecated = "Use `set_stream()` instead."] pub fn stream(&mut self, val: Option<&MediaStream>) -> &mut Self { - self.stream_shim(val); + self.set_stream(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs index d66b918fe20..734dfeede6c 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] pub type MediaStreamTrackEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_bubbles(this: &MediaStreamTrackEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_cancelable(this: &MediaStreamTrackEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MediaStreamTrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaStreamTrackEventInit, val: bool); + pub fn set_composed(this: &MediaStreamTrackEventInit, val: bool); #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] + #[wasm_bindgen(method, getter = "track")] + pub fn get_track(this: &MediaStreamTrackEventInit) -> MediaStreamTrack; + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); + pub fn set_track(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); } impl MediaStreamTrackEventInit { #[cfg(feature = "MediaStreamTrack")] @@ -31,33 +64,25 @@ impl MediaStreamTrackEventInit { ret.track(track); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs index a85a9268d57..67d0fcd0431 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaStreamTrackGeneratorInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `kind` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "kind")] + pub fn get_kind(this: &MediaStreamTrackGeneratorInit) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `kind` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "kind")] - fn kind_shim(this: &MediaStreamTrackGeneratorInit, val: &str); + pub fn set_kind(this: &MediaStreamTrackGeneratorInit, val: &str); } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackGeneratorInit { @@ -32,14 +48,9 @@ impl MediaStreamTrackGeneratorInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `kind` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_kind()` instead."] pub fn kind(&mut self, val: &str) -> &mut Self { - self.kind_shim(val); + self.set_kind(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs index fabbd4a7418..76cf12ab2c0 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaStreamTrackProcessorInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxBufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "maxBufferSize")] + pub fn get_max_buffer_size(this: &MediaStreamTrackProcessorInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `maxBufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "maxBufferSize")] - fn max_buffer_size_shim(this: &MediaStreamTrackProcessorInit, val: u16); + pub fn set_max_buffer_size(this: &MediaStreamTrackProcessorInit, val: u16); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "track")] + pub fn get_track(this: &MediaStreamTrackProcessorInit) -> MediaStreamTrack; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); + pub fn set_track(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackProcessorInit { @@ -36,26 +69,16 @@ impl MediaStreamTrackProcessorInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `maxBufferSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max_buffer_size()` instead."] pub fn max_buffer_size(&mut self, val: u16) -> &mut Self { - self.max_buffer_size_shim(val); + self.set_max_buffer_size(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs b/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs index 76373c3967e..1c6d82c5cb9 100644 --- a/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs +++ b/crates/web-sys/src/features/gen_MediaTrackCapabilities.rs @@ -14,58 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaTrackCapabilities; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] - #[wasm_bindgen(method, setter = "aspectRatio")] - fn aspect_ratio_shim(this: &MediaTrackCapabilities, val: &DoubleRange); - #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "ULongRange")] - #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackCapabilities, val: &ULongRange); - #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackCapabilities, val: &str); - #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "DoubleRange")] - #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackCapabilities, val: &DoubleRange); - #[wasm_bindgen(method, setter = "groupId")] - fn group_id_shim(this: &MediaTrackCapabilities, val: &str); - #[cfg(feature = "ULongRange")] - #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackCapabilities, val: &ULongRange); - #[cfg(feature = "DoubleRange")] - #[wasm_bindgen(method, setter = "latency")] - fn latency_shim(this: &MediaTrackCapabilities, val: &DoubleRange); - #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "resizeMode")] - fn resize_mode_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); - #[cfg(feature = "ULongRange")] - #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &MediaTrackCapabilities, val: &ULongRange); - #[cfg(feature = "ULongRange")] - #[wasm_bindgen(method, setter = "sampleSize")] - fn sample_size_shim(this: &MediaTrackCapabilities, val: &ULongRange); - #[cfg(feature = "ULongRange")] - #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackCapabilities, val: &ULongRange); -} -#[cfg(web_sys_unstable_apis)] -impl MediaTrackCapabilities { - #[doc = "Construct a new `MediaTrackCapabilities`."] + #[doc = "Get the `aspectRatio` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "aspectRatio")] + pub fn get_aspect_ratio(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] #[doc = "Change the `aspectRatio` field of this object."] @@ -74,10 +32,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn aspect_ratio(&mut self, val: &DoubleRange) -> &mut Self { - self.aspect_ratio_shim(val); - self - } + #[wasm_bindgen(method, setter = "aspectRatio")] + pub fn set_aspect_ratio(this: &MediaTrackCapabilities, val: &DoubleRange); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "autoGainControl")] + pub fn get_auto_gain_control(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `autoGainControl` field of this object."] #[doc = ""] @@ -85,10 +50,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.auto_gain_control_shim(val); - self - } + #[wasm_bindgen(method, setter = "autoGainControl")] + pub fn set_auto_gain_control(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Change the `channelCount` field of this object."] @@ -97,10 +70,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn channel_count(&mut self, val: &ULongRange) -> &mut Self { - self.channel_count_shim(val); - self - } + #[wasm_bindgen(method, setter = "channelCount")] + pub fn set_channel_count(this: &MediaTrackCapabilities, val: &ULongRange); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `deviceId` field of this object."] #[doc = ""] @@ -108,10 +88,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); - self - } + #[wasm_bindgen(method, setter = "deviceId")] + pub fn set_device_id(this: &MediaTrackCapabilities, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "echoCancellation")] + pub fn get_echo_cancellation(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `echoCancellation` field of this object."] #[doc = ""] @@ -119,10 +106,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.echo_cancellation_shim(val); - self - } + #[wasm_bindgen(method, setter = "echoCancellation")] + pub fn set_echo_cancellation(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "facingMode")] + pub fn get_facing_mode(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `facingMode` field of this object."] #[doc = ""] @@ -130,10 +124,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.facing_mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "facingMode")] + pub fn set_facing_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DoubleRange")] + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frameRate")] + pub fn get_frame_rate(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] #[doc = "Change the `frameRate` field of this object."] @@ -142,10 +144,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn frame_rate(&mut self, val: &DoubleRange) -> &mut Self { - self.frame_rate_shim(val); - self - } + #[wasm_bindgen(method, setter = "frameRate")] + pub fn set_frame_rate(this: &MediaTrackCapabilities, val: &DoubleRange); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "groupId")] + pub fn get_group_id(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `groupId` field of this object."] #[doc = ""] @@ -153,10 +162,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn group_id(&mut self, val: &str) -> &mut Self { - self.group_id_shim(val); - self - } + #[wasm_bindgen(method, setter = "groupId")] + pub fn set_group_id(this: &MediaTrackCapabilities, val: &str); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Change the `height` field of this object."] @@ -165,10 +182,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn height(&mut self, val: &ULongRange) -> &mut Self { - self.height_shim(val); - self - } + #[wasm_bindgen(method, setter = "height")] + pub fn set_height(this: &MediaTrackCapabilities, val: &ULongRange); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DoubleRange")] + #[doc = "Get the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "latency")] + pub fn get_latency(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DoubleRange")] #[doc = "Change the `latency` field of this object."] @@ -177,10 +202,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn latency(&mut self, val: &DoubleRange) -> &mut Self { - self.latency_shim(val); - self - } + #[wasm_bindgen(method, setter = "latency")] + pub fn set_latency(this: &MediaTrackCapabilities, val: &DoubleRange); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "noiseSuppression")] + pub fn get_noise_suppression(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `noiseSuppression` field of this object."] #[doc = ""] @@ -188,10 +220,17 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.noise_suppression_shim(val); - self - } + #[wasm_bindgen(method, setter = "noiseSuppression")] + pub fn set_noise_suppression(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `resizeMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "resizeMode")] + pub fn get_resize_mode(this: &MediaTrackCapabilities) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `resizeMode` field of this object."] #[doc = ""] @@ -199,10 +238,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn resize_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.resize_mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "resizeMode")] + pub fn set_resize_mode(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Change the `sampleRate` field of this object."] @@ -211,10 +258,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn sample_rate(&mut self, val: &ULongRange) -> &mut Self { - self.sample_rate_shim(val); - self - } + #[wasm_bindgen(method, setter = "sampleRate")] + pub fn set_sample_rate(this: &MediaTrackCapabilities, val: &ULongRange); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[doc = "Get the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sampleSize")] + pub fn get_sample_size(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Change the `sampleSize` field of this object."] @@ -223,10 +278,18 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn sample_size(&mut self, val: &ULongRange) -> &mut Self { - self.sample_size_shim(val); - self - } + #[wasm_bindgen(method, setter = "sampleSize")] + pub fn set_sample_size(this: &MediaTrackCapabilities, val: &ULongRange); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &MediaTrackCapabilities) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ULongRange")] #[doc = "Change the `width` field of this object."] @@ -235,8 +298,118 @@ impl MediaTrackCapabilities { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "width")] + pub fn set_width(this: &MediaTrackCapabilities, val: &ULongRange); +} +#[cfg(web_sys_unstable_apis)] +impl MediaTrackCapabilities { + #[doc = "Construct a new `MediaTrackCapabilities`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DoubleRange")] + #[deprecated = "Use `set_aspect_ratio()` instead."] + pub fn aspect_ratio(&mut self, val: &DoubleRange) -> &mut Self { + self.set_aspect_ratio(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_auto_gain_control()` instead."] + pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_auto_gain_control(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[deprecated = "Use `set_channel_count()` instead."] + pub fn channel_count(&mut self, val: &ULongRange) -> &mut Self { + self.set_channel_count(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_device_id()` instead."] + pub fn device_id(&mut self, val: &str) -> &mut Self { + self.set_device_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_echo_cancellation()` instead."] + pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_echo_cancellation(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_facing_mode()` instead."] + pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_facing_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DoubleRange")] + #[deprecated = "Use `set_frame_rate()` instead."] + pub fn frame_rate(&mut self, val: &DoubleRange) -> &mut Self { + self.set_frame_rate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_group_id()` instead."] + pub fn group_id(&mut self, val: &str) -> &mut Self { + self.set_group_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[deprecated = "Use `set_height()` instead."] + pub fn height(&mut self, val: &ULongRange) -> &mut Self { + self.set_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DoubleRange")] + #[deprecated = "Use `set_latency()` instead."] + pub fn latency(&mut self, val: &DoubleRange) -> &mut Self { + self.set_latency(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_noise_suppression()` instead."] + pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_noise_suppression(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_resize_mode()` instead."] + pub fn resize_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_resize_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[deprecated = "Use `set_sample_rate()` instead."] + pub fn sample_rate(&mut self, val: &ULongRange) -> &mut Self { + self.set_sample_rate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[deprecated = "Use `set_sample_size()` instead."] + pub fn sample_size(&mut self, val: &ULongRange) -> &mut Self { + self.set_sample_size(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ULongRange")] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &ULongRange) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs index 866fad34359..2624e64f81a 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs @@ -10,38 +10,166 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub type MediaTrackConstraintSet; + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "autoGainControl")] + pub fn get_auto_gain_control(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_auto_gain_control(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "browserWindow")] + pub fn get_browser_window(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "browserWindow")] - fn browser_window_shim(this: &MediaTrackConstraintSet, val: f64); + pub fn set_browser_window(this: &MediaTrackConstraintSet, val: f64); + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_channel_count(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_device_id(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "echoCancellation")] + pub fn get_echo_cancellation(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_echo_cancellation(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "facingMode")] + pub fn get_facing_mode(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_facing_mode(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "frameRate")] + pub fn get_frame_rate(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_frame_rate(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "mediaSource")] + pub fn get_media_source(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "mediaSource")] - fn media_source_shim(this: &MediaTrackConstraintSet, val: &str); + pub fn set_media_source(this: &MediaTrackConstraintSet, val: &str); + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "noiseSuppression")] + pub fn get_noise_suppression(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_noise_suppression(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "scrollWithPage")] + pub fn get_scroll_with_page(this: &MediaTrackConstraintSet) -> Option; + #[doc = "Change the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "scrollWithPage")] - fn scroll_with_page_shim(this: &MediaTrackConstraintSet, val: bool); + pub fn set_scroll_with_page(this: &MediaTrackConstraintSet, val: bool); + #[doc = "Get the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "viewportHeight")] + pub fn get_viewport_height(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportHeight")] - fn viewport_height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_height(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "viewportOffsetX")] + pub fn get_viewport_offset_x(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn viewport_offset_x_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_x(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "viewportOffsetY")] + pub fn get_viewport_offset_y(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn viewport_offset_y_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_y(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "viewportWidth")] + pub fn get_viewport_width(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "viewportWidth")] - fn viewport_width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + pub fn set_width(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); } impl MediaTrackConstraintSet { #[doc = "Construct a new `MediaTrackConstraintSet`."] @@ -52,116 +180,84 @@ impl MediaTrackConstraintSet { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control(val); self } - #[doc = "Change the `browserWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_browser_window()` instead."] pub fn browser_window(&mut self, val: f64) -> &mut Self { - self.browser_window_shim(val); + self.set_browser_window(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.device_id_shim(val); + self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `mediaSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_media_source()` instead."] pub fn media_source(&mut self, val: &str) -> &mut Self { - self.media_source_shim(val); + self.set_media_source(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression(val); self } - #[doc = "Change the `scrollWithPage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_scroll_with_page()` instead."] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { - self.scroll_with_page_shim(val); + self.set_scroll_with_page(val); self } - #[doc = "Change the `viewportHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_height()` instead."] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_height_shim(val); + self.set_viewport_height(val); self } - #[doc = "Change the `viewportOffsetX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_offset_x()` instead."] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_x_shim(val); + self.set_viewport_offset_x(val); self } - #[doc = "Change the `viewportOffsetY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_offset_y()` instead."] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_y_shim(val); + self.set_viewport_offset_y(val); self } - #[doc = "Change the `viewportWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_viewport_width()` instead."] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_width_shim(val); + self.set_viewport_width(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs index 8b89c26eef7..6d40272de64 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs @@ -10,40 +10,176 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub type MediaTrackConstraints; + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "autoGainControl")] + pub fn get_auto_gain_control(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_auto_gain_control(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "browserWindow")] + pub fn get_browser_window(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "browserWindow")] - fn browser_window_shim(this: &MediaTrackConstraints, val: f64); + pub fn set_browser_window(this: &MediaTrackConstraints, val: f64); + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_channel_count(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_device_id(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "echoCancellation")] + pub fn get_echo_cancellation(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_echo_cancellation(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "facingMode")] + pub fn get_facing_mode(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_facing_mode(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "frameRate")] + pub fn get_frame_rate(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_frame_rate(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "mediaSource")] + pub fn get_media_source(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "mediaSource")] - fn media_source_shim(this: &MediaTrackConstraints, val: &str); + pub fn set_media_source(this: &MediaTrackConstraints, val: &str); + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "noiseSuppression")] + pub fn get_noise_suppression(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_noise_suppression(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "scrollWithPage")] + pub fn get_scroll_with_page(this: &MediaTrackConstraints) -> Option; + #[doc = "Change the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "scrollWithPage")] - fn scroll_with_page_shim(this: &MediaTrackConstraints, val: bool); + pub fn set_scroll_with_page(this: &MediaTrackConstraints, val: bool); + #[doc = "Get the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "viewportHeight")] + pub fn get_viewport_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportHeight")] - fn viewport_height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "viewportOffsetX")] + pub fn get_viewport_offset_x(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn viewport_offset_x_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_x(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "viewportOffsetY")] + pub fn get_viewport_offset_y(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn viewport_offset_y_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_offset_y(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "viewportWidth")] + pub fn get_viewport_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "viewportWidth")] - fn viewport_width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_viewport_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `advanced` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[wasm_bindgen(method, getter = "advanced")] + pub fn get_advanced(this: &MediaTrackConstraints) -> Option<::js_sys::Array>; + #[doc = "Change the `advanced` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] #[wasm_bindgen(method, setter = "advanced")] - fn advanced_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + pub fn set_advanced(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); } impl MediaTrackConstraints { #[doc = "Construct a new `MediaTrackConstraints`."] @@ -54,123 +190,89 @@ impl MediaTrackConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control(val); self } - #[doc = "Change the `browserWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_browser_window()` instead."] pub fn browser_window(&mut self, val: f64) -> &mut Self { - self.browser_window_shim(val); + self.set_browser_window(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.device_id_shim(val); + self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `mediaSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_media_source()` instead."] pub fn media_source(&mut self, val: &str) -> &mut Self { - self.media_source_shim(val); + self.set_media_source(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression(val); self } - #[doc = "Change the `scrollWithPage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_scroll_with_page()` instead."] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { - self.scroll_with_page_shim(val); + self.set_scroll_with_page(val); self } - #[doc = "Change the `viewportHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_height()` instead."] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_height_shim(val); + self.set_viewport_height(val); self } - #[doc = "Change the `viewportOffsetX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_offset_x()` instead."] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_x_shim(val); + self.set_viewport_offset_x(val); self } - #[doc = "Change the `viewportOffsetY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_offset_y()` instead."] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_y_shim(val); + self.set_viewport_offset_y(val); self } - #[doc = "Change the `viewportWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_viewport_width()` instead."] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_width_shim(val); + self.set_viewport_width(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } - #[doc = "Change the `advanced` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + #[deprecated = "Use `set_advanced()` instead."] pub fn advanced(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.advanced_shim(val); + self.set_advanced(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackSettings.rs b/crates/web-sys/src/features/gen_MediaTrackSettings.rs index 3bd4e245aac..455fcad4822 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSettings.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSettings.rs @@ -10,24 +10,96 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub type MediaTrackSettings; + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "autoGainControl")] + pub fn get_auto_gain_control(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackSettings, val: bool); + pub fn set_auto_gain_control(this: &MediaTrackSettings, val: bool); + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackSettings, val: i32); + pub fn set_channel_count(this: &MediaTrackSettings, val: i32); + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackSettings, val: &str); + pub fn set_device_id(this: &MediaTrackSettings, val: &str); + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "echoCancellation")] + pub fn get_echo_cancellation(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackSettings, val: bool); + pub fn set_echo_cancellation(this: &MediaTrackSettings, val: bool); + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "facingMode")] + pub fn get_facing_mode(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackSettings, val: &str); + pub fn set_facing_mode(this: &MediaTrackSettings, val: &str); + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "frameRate")] + pub fn get_frame_rate(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackSettings, val: f64); + pub fn set_frame_rate(this: &MediaTrackSettings, val: f64); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackSettings, val: i32); + pub fn set_height(this: &MediaTrackSettings, val: i32); + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "noiseSuppression")] + pub fn get_noise_suppression(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackSettings, val: bool); + pub fn set_noise_suppression(this: &MediaTrackSettings, val: bool); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &MediaTrackSettings) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackSettings, val: i32); + pub fn set_width(this: &MediaTrackSettings, val: i32); } impl MediaTrackSettings { #[doc = "Construct a new `MediaTrackSettings`."] @@ -38,67 +110,49 @@ impl MediaTrackSettings { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: i32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); + self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: &str) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: f64) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs index 1cf7fc77567..6e5cc4cc683 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs @@ -10,36 +10,156 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub type MediaTrackSupportedConstraints; + #[doc = "Get the `aspectRatio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "aspectRatio")] + pub fn get_aspect_ratio(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `aspectRatio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "aspectRatio")] - fn aspect_ratio_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_aspect_ratio(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "autoGainControl")] + pub fn get_auto_gain_control(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_auto_gain_control(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_channel_count(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "deviceId")] + pub fn get_device_id(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_device_id(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "echoCancellation")] + pub fn get_echo_cancellation(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_echo_cancellation(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "facingMode")] + pub fn get_facing_mode(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_facing_mode(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "frameRate")] + pub fn get_frame_rate(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_frame_rate(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "groupId")] + pub fn get_group_id(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "groupId")] - fn group_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_group_id(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_height(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "latency")] + pub fn get_latency(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "latency")] - fn latency_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_latency(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "noiseSuppression")] + pub fn get_noise_suppression(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_noise_suppression(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_sample_rate(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "sampleSize")] + pub fn get_sample_size(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "sampleSize")] - fn sample_size_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_sample_size(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `volume` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "volume")] + pub fn get_volume(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `volume` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "volume")] - fn volume_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_volume(this: &MediaTrackSupportedConstraints, val: bool); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &MediaTrackSupportedConstraints) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackSupportedConstraints, val: bool); + pub fn set_width(this: &MediaTrackSupportedConstraints, val: bool); } impl MediaTrackSupportedConstraints { #[doc = "Construct a new `MediaTrackSupportedConstraints`."] @@ -50,109 +170,79 @@ impl MediaTrackSupportedConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `aspectRatio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_aspect_ratio()` instead."] pub fn aspect_ratio(&mut self, val: bool) -> &mut Self { - self.aspect_ratio_shim(val); + self.set_aspect_ratio(val); self } - #[doc = "Change the `autoGainControl` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_auto_gain_control()` instead."] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control(val); self } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: bool) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } - #[doc = "Change the `deviceId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_device_id()` instead."] pub fn device_id(&mut self, val: bool) -> &mut Self { - self.device_id_shim(val); + self.set_device_id(val); self } - #[doc = "Change the `echoCancellation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_echo_cancellation()` instead."] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation(val); self } - #[doc = "Change the `facingMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_facing_mode()` instead."] pub fn facing_mode(&mut self, val: bool) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode(val); self } - #[doc = "Change the `frameRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_frame_rate()` instead."] pub fn frame_rate(&mut self, val: bool) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate(val); self } - #[doc = "Change the `groupId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_group_id()` instead."] pub fn group_id(&mut self, val: bool) -> &mut Self { - self.group_id_shim(val); + self.set_group_id(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: bool) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `latency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_latency()` instead."] pub fn latency(&mut self, val: bool) -> &mut Self { - self.latency_shim(val); + self.set_latency(val); self } - #[doc = "Change the `noiseSuppression` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_noise_suppression()` instead."] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: bool) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } - #[doc = "Change the `sampleSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_sample_size()` instead."] pub fn sample_size(&mut self, val: bool) -> &mut Self { - self.sample_size_shim(val); + self.set_sample_size(val); self } - #[doc = "Change the `volume` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_volume()` instead."] pub fn volume(&mut self, val: bool) -> &mut Self { - self.volume_shim(val); + self.set_volume(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: bool) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryAttribution.rs b/crates/web-sys/src/features/gen_MemoryAttribution.rs index 9fdedda1113..be7056aa458 100644 --- a/crates/web-sys/src/features/gen_MemoryAttribution.rs +++ b/crates/web-sys/src/features/gen_MemoryAttribution.rs @@ -14,13 +14,62 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryAttribution; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MemoryAttributionContainer")] + #[doc = "Get the `container` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "container")] + pub fn get_container(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MemoryAttributionContainer")] + #[doc = "Change the `container` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "container")] - fn container_shim(this: &MemoryAttribution, val: &MemoryAttributionContainer); + pub fn set_container(this: &MemoryAttribution, val: &MemoryAttributionContainer); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "scope")] + pub fn get_scope(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &MemoryAttribution, val: &str); + pub fn set_scope(this: &MemoryAttribution, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &MemoryAttribution) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &MemoryAttribution, val: &str); + pub fn set_url(this: &MemoryAttribution, val: &str); } #[cfg(web_sys_unstable_apis)] impl MemoryAttribution { @@ -37,36 +86,21 @@ impl MemoryAttribution { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "MemoryAttributionContainer")] - #[doc = "Change the `container` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_container()` instead."] pub fn container(&mut self, val: &MemoryAttributionContainer) -> &mut Self { - self.container_shim(val); + self.set_container(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs index 0dfe8ce12ea..c7a6bb4c1e8 100644 --- a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs +++ b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryAttributionContainer; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &MemoryAttributionContainer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &MemoryAttributionContainer, val: &str); + pub fn set_id(this: &MemoryAttributionContainer, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "src")] + pub fn get_src(this: &MemoryAttributionContainer) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "src")] - fn src_shim(this: &MemoryAttributionContainer, val: &str); + pub fn set_src(this: &MemoryAttributionContainer, val: &str); } #[cfg(web_sys_unstable_apis)] impl MemoryAttributionContainer { @@ -33,25 +65,15 @@ impl MemoryAttributionContainer { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `src` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_src()` instead."] pub fn src(&mut self, val: &str) -> &mut Self { - self.src_shim(val); + self.set_src(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs index 05592cc877c..97ad8cecf9d 100644 --- a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs +++ b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryBreakdownEntry; - #[wasm_bindgen(method, setter = "attribution")] - fn attribution_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &MemoryBreakdownEntry, val: f64); - #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl MemoryBreakdownEntry { - #[doc = "Construct a new `MemoryBreakdownEntry`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `attribution` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "attribution")] + pub fn get_attribution(this: &MemoryBreakdownEntry) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `attribution` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl MemoryBreakdownEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn attribution(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribution_shim(val); - self - } + #[wasm_bindgen(method, setter = "attribution")] + pub fn set_attribution(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytes")] + pub fn get_bytes(this: &MemoryBreakdownEntry) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytes` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl MemoryBreakdownEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes(&mut self, val: f64) -> &mut Self { - self.bytes_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytes")] + pub fn set_bytes(this: &MemoryBreakdownEntry, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "types")] + pub fn get_types(this: &MemoryBreakdownEntry) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `types` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl MemoryBreakdownEntry { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "types")] + pub fn set_types(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl MemoryBreakdownEntry { + #[doc = "Construct a new `MemoryBreakdownEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_attribution()` instead."] + pub fn attribution(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_attribution(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes()` instead."] + pub fn bytes(&mut self, val: f64) -> &mut Self { + self.set_bytes(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_types()` instead."] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryMeasurement.rs b/crates/web-sys/src/features/gen_MemoryMeasurement.rs index b3bbfaca883..041a0e64493 100644 --- a/crates/web-sys/src/features/gen_MemoryMeasurement.rs +++ b/crates/web-sys/src/features/gen_MemoryMeasurement.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryMeasurement; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `breakdown` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "breakdown")] + pub fn get_breakdown(this: &MemoryMeasurement) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `breakdown` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "breakdown")] - fn breakdown_shim(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); + pub fn set_breakdown(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytes")] + pub fn get_bytes(this: &MemoryMeasurement) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &MemoryMeasurement, val: f64); + pub fn set_bytes(this: &MemoryMeasurement, val: f64); } #[cfg(web_sys_unstable_apis)] impl MemoryMeasurement { @@ -33,25 +65,15 @@ impl MemoryMeasurement { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `breakdown` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_breakdown()` instead."] pub fn breakdown(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.breakdown_shim(val); + self.set_breakdown(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: f64) -> &mut Self { - self.bytes_shim(val); + self.set_bytes(val); self } } diff --git a/crates/web-sys/src/features/gen_MessageEventInit.rs b/crates/web-sys/src/features/gen_MessageEventInit.rs index 0e5381f8cc9..82a6cfe5cec 100644 --- a/crates/web-sys/src/features/gen_MessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MessageEventInit.rs @@ -10,22 +10,86 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub type MessageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MessageEventInit, val: bool); + pub fn set_bubbles(this: &MessageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MessageEventInit, val: bool); + pub fn set_cancelable(this: &MessageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MessageEventInit, val: bool); + pub fn set_composed(this: &MessageEventInit, val: bool); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &MessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "lastEventId")] + pub fn get_last_event_id(this: &MessageEventInit) -> Option; + #[doc = "Change the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "lastEventId")] - fn last_event_id_shim(this: &MessageEventInit, val: &str); + pub fn set_last_event_id(this: &MessageEventInit, val: &str); + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &MessageEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &MessageEventInit, val: &str); + pub fn set_origin(this: &MessageEventInit, val: &str); + #[doc = "Get the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "ports")] + pub fn get_ports(this: &MessageEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "ports")] - fn ports_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_ports(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &MessageEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &MessageEventInit, val: Option<&::js_sys::Object>); + pub fn set_source(this: &MessageEventInit, val: Option<&::js_sys::Object>); } impl MessageEventInit { #[doc = "Construct a new `MessageEventInit`."] @@ -36,60 +100,44 @@ impl MessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } - #[doc = "Change the `lastEventId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_last_event_id()` instead."] pub fn last_event_id(&mut self, val: &str) -> &mut Self { - self.last_event_id_shim(val); + self.set_last_event_id(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `ports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_ports()` instead."] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ports_shim(val); + self.set_ports(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs index 77e2f4b71df..97410953386 100644 --- a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] pub type MidiConnectionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MidiConnectionEventInit, val: bool); + pub fn set_bubbles(this: &MidiConnectionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MidiConnectionEventInit, val: bool); + pub fn set_cancelable(this: &MidiConnectionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MidiConnectionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MidiConnectionEventInit, val: bool); + pub fn set_composed(this: &MidiConnectionEventInit, val: bool); #[cfg(feature = "MidiPort")] + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] + #[wasm_bindgen(method, getter = "port")] + pub fn get_port(this: &MidiConnectionEventInit) -> Option; + #[cfg(feature = "MidiPort")] + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &MidiConnectionEventInit, val: Option<&MidiPort>); + pub fn set_port(this: &MidiConnectionEventInit, val: Option<&MidiPort>); } impl MidiConnectionEventInit { #[doc = "Construct a new `MidiConnectionEventInit`."] @@ -29,33 +62,25 @@ impl MidiConnectionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "MidiPort")] - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: Option<&MidiPort>) -> &mut Self { - self.port_shim(val); + self.set_port(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs index da581fa01f1..9ea620bda4a 100644 --- a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] pub type MidiMessageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MidiMessageEventInit, val: bool); + pub fn set_bubbles(this: &MidiMessageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MidiMessageEventInit, val: bool); + pub fn set_cancelable(this: &MidiMessageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MidiMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MidiMessageEventInit, val: bool); + pub fn set_composed(this: &MidiMessageEventInit, val: bool); } impl MidiMessageEventInit { #[doc = "Construct a new `MidiMessageEventInit`."] @@ -26,25 +50,19 @@ impl MidiMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiOptions.rs b/crates/web-sys/src/features/gen_MidiOptions.rs index bb9a50ece05..3404891355a 100644 --- a/crates/web-sys/src/features/gen_MidiOptions.rs +++ b/crates/web-sys/src/features/gen_MidiOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] pub type MidiOptions; + #[doc = "Get the `software` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[wasm_bindgen(method, getter = "software")] + pub fn get_software(this: &MidiOptions) -> Option; + #[doc = "Change the `software` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, setter = "software")] - fn software_shim(this: &MidiOptions, val: bool); + pub fn set_software(this: &MidiOptions, val: bool); + #[doc = "Get the `sysex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[wasm_bindgen(method, getter = "sysex")] + pub fn get_sysex(this: &MidiOptions) -> Option; + #[doc = "Change the `sysex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] #[wasm_bindgen(method, setter = "sysex")] - fn sysex_shim(this: &MidiOptions, val: bool); + pub fn set_sysex(this: &MidiOptions, val: bool); } impl MidiOptions { #[doc = "Construct a new `MidiOptions`."] @@ -24,18 +40,14 @@ impl MidiOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `software` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[deprecated = "Use `set_software()` instead."] pub fn software(&mut self, val: bool) -> &mut Self { - self.software_shim(val); + self.set_software(val); self } - #[doc = "Change the `sysex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + #[deprecated = "Use `set_sysex()` instead."] pub fn sysex(&mut self, val: bool) -> &mut Self { - self.sysex_shim(val); + self.set_sysex(val); self } } diff --git a/crates/web-sys/src/features/gen_MouseEventInit.rs b/crates/web-sys/src/features/gen_MouseEventInit.rs index 340e3bddebd..61220cd7536 100644 --- a/crates/web-sys/src/features/gen_MouseEventInit.rs +++ b/crates/web-sys/src/features/gen_MouseEventInit.rs @@ -10,62 +10,280 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub type MouseEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &MouseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MouseEventInit, val: bool); + pub fn set_bubbles(this: &MouseEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &MouseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MouseEventInit, val: bool); + pub fn set_cancelable(this: &MouseEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &MouseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MouseEventInit, val: bool); + pub fn set_composed(this: &MouseEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &MouseEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &MouseEventInit, val: i32); + pub fn set_detail(this: &MouseEventInit, val: i32); + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &MouseEventInit) -> Option; #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &MouseEventInit, val: Option<&Window>); + pub fn set_view(this: &MouseEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &MouseEventInit, val: bool); + pub fn set_alt_key(this: &MouseEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &MouseEventInit, val: bool); + pub fn set_ctrl_key(this: &MouseEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &MouseEventInit, val: bool); + pub fn set_meta_key(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_fn(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_num_lock(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_os(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_symbol(this: &MouseEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &MouseEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &MouseEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &MouseEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &MouseEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &MouseEventInit, val: bool); + pub fn set_shift_key(this: &MouseEventInit, val: bool); + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "button")] + pub fn get_button(this: &MouseEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &MouseEventInit, val: i16); + pub fn set_button(this: &MouseEventInit, val: i16); + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "buttons")] + pub fn get_buttons(this: &MouseEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &MouseEventInit, val: u16); + pub fn set_buttons(this: &MouseEventInit, val: u16); + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "clientX")] + pub fn get_client_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &MouseEventInit, val: i32); + pub fn set_client_x(this: &MouseEventInit, val: i32); + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "clientY")] + pub fn get_client_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &MouseEventInit, val: i32); + pub fn set_client_y(this: &MouseEventInit, val: i32); + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "movementX")] + pub fn get_movement_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &MouseEventInit, val: i32); + pub fn set_movement_x(this: &MouseEventInit, val: i32); + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "movementY")] + pub fn get_movement_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &MouseEventInit, val: i32); + pub fn set_movement_y(this: &MouseEventInit, val: i32); + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "relatedTarget")] + pub fn get_related_target(this: &MouseEventInit) -> Option; #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &MouseEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &MouseEventInit, val: Option<&EventTarget>); + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "screenX")] + pub fn get_screen_x(this: &MouseEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &MouseEventInit, val: i32); + pub fn set_screen_x(this: &MouseEventInit, val: i32); + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[wasm_bindgen(method, getter = "screenY")] + pub fn get_screen_y(this: &MouseEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &MouseEventInit, val: i32); + pub fn set_screen_y(this: &MouseEventInit, val: i32); } impl MouseEventInit { #[doc = "Construct a new `MouseEventInit`."] @@ -76,195 +294,141 @@ impl MouseEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y(val); self } } diff --git a/crates/web-sys/src/features/gen_MutationObserverInit.rs b/crates/web-sys/src/features/gen_MutationObserverInit.rs index 35251f2f6e8..69ac7cf001d 100644 --- a/crates/web-sys/src/features/gen_MutationObserverInit.rs +++ b/crates/web-sys/src/features/gen_MutationObserverInit.rs @@ -10,24 +10,96 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub type MutationObserverInit; + #[doc = "Get the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "animations")] + pub fn get_animations(this: &MutationObserverInit) -> Option; + #[doc = "Change the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "animations")] - fn animations_shim(this: &MutationObserverInit, val: bool); + pub fn set_animations(this: &MutationObserverInit, val: bool); + #[doc = "Get the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "attributeFilter")] + pub fn get_attribute_filter(this: &MutationObserverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributeFilter")] - fn attribute_filter_shim(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_attribute_filter(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "attributeOldValue")] + pub fn get_attribute_old_value(this: &MutationObserverInit) -> Option; + #[doc = "Change the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributeOldValue")] - fn attribute_old_value_shim(this: &MutationObserverInit, val: bool); + pub fn set_attribute_old_value(this: &MutationObserverInit, val: bool); + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "attributes")] + pub fn get_attributes(this: &MutationObserverInit) -> Option; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &MutationObserverInit, val: bool); + pub fn set_attributes(this: &MutationObserverInit, val: bool); + #[doc = "Get the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "characterData")] + pub fn get_character_data(this: &MutationObserverInit) -> Option; + #[doc = "Change the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "characterData")] - fn character_data_shim(this: &MutationObserverInit, val: bool); + pub fn set_character_data(this: &MutationObserverInit, val: bool); + #[doc = "Get the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "characterDataOldValue")] + pub fn get_character_data_old_value(this: &MutationObserverInit) -> Option; + #[doc = "Change the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn character_data_old_value_shim(this: &MutationObserverInit, val: bool); + pub fn set_character_data_old_value(this: &MutationObserverInit, val: bool); + #[doc = "Get the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "childList")] + pub fn get_child_list(this: &MutationObserverInit) -> Option; + #[doc = "Change the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "childList")] - fn child_list_shim(this: &MutationObserverInit, val: bool); + pub fn set_child_list(this: &MutationObserverInit, val: bool); + #[doc = "Get the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] + pub fn get_native_anonymous_child_list(this: &MutationObserverInit) -> Option; + #[doc = "Change the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn native_anonymous_child_list_shim(this: &MutationObserverInit, val: bool); + pub fn set_native_anonymous_child_list(this: &MutationObserverInit, val: bool); + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[wasm_bindgen(method, getter = "subtree")] + pub fn get_subtree(this: &MutationObserverInit) -> Option; + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &MutationObserverInit, val: bool); + pub fn set_subtree(this: &MutationObserverInit, val: bool); } impl MutationObserverInit { #[doc = "Construct a new `MutationObserverInit`."] @@ -38,67 +110,49 @@ impl MutationObserverInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `animations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_animations()` instead."] pub fn animations(&mut self, val: bool) -> &mut Self { - self.animations_shim(val); + self.set_animations(val); self } - #[doc = "Change the `attributeFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attribute_filter()` instead."] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribute_filter_shim(val); + self.set_attribute_filter(val); self } - #[doc = "Change the `attributeOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attribute_old_value()` instead."] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { - self.attribute_old_value_shim(val); + self.set_attribute_old_value(val); self } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: bool) -> &mut Self { - self.attributes_shim(val); + self.set_attributes(val); self } - #[doc = "Change the `characterData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_character_data()` instead."] pub fn character_data(&mut self, val: bool) -> &mut Self { - self.character_data_shim(val); + self.set_character_data(val); self } - #[doc = "Change the `characterDataOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_character_data_old_value()` instead."] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { - self.character_data_old_value_shim(val); + self.set_character_data_old_value(val); self } - #[doc = "Change the `childList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_child_list()` instead."] pub fn child_list(&mut self, val: bool) -> &mut Self { - self.child_list_shim(val); + self.set_child_list(val); self } - #[doc = "Change the `nativeAnonymousChildList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_native_anonymous_child_list()` instead."] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { - self.native_anonymous_child_list_shim(val); + self.set_native_anonymous_child_list(val); self } - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree(val); self } } diff --git a/crates/web-sys/src/features/gen_MutationObservingInfo.rs b/crates/web-sys/src/features/gen_MutationObservingInfo.rs index ebe00cccdf0..6d6aceb0514 100644 --- a/crates/web-sys/src/features/gen_MutationObservingInfo.rs +++ b/crates/web-sys/src/features/gen_MutationObservingInfo.rs @@ -10,27 +10,108 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub type MutationObservingInfo; + #[doc = "Get the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "animations")] + pub fn get_animations(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "animations")] - fn animations_shim(this: &MutationObservingInfo, val: bool); + pub fn set_animations(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "attributeFilter")] + pub fn get_attribute_filter(this: &MutationObservingInfo) -> Option<::js_sys::Array>; + #[doc = "Change the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributeFilter")] - fn attribute_filter_shim(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); + pub fn set_attribute_filter(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "attributeOldValue")] + pub fn get_attribute_old_value(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributeOldValue")] - fn attribute_old_value_shim(this: &MutationObservingInfo, val: bool); + pub fn set_attribute_old_value(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "attributes")] + pub fn get_attributes(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &MutationObservingInfo, val: bool); + pub fn set_attributes(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "characterData")] + pub fn get_character_data(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "characterData")] - fn character_data_shim(this: &MutationObservingInfo, val: bool); + pub fn set_character_data(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "characterDataOldValue")] + pub fn get_character_data_old_value(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn character_data_old_value_shim(this: &MutationObservingInfo, val: bool); + pub fn set_character_data_old_value(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "childList")] + pub fn get_child_list(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "childList")] - fn child_list_shim(this: &MutationObservingInfo, val: bool); + pub fn set_child_list(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] + pub fn get_native_anonymous_child_list(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn native_anonymous_child_list_shim(this: &MutationObservingInfo, val: bool); + pub fn set_native_anonymous_child_list(this: &MutationObservingInfo, val: bool); + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[wasm_bindgen(method, getter = "subtree")] + pub fn get_subtree(this: &MutationObservingInfo) -> Option; + #[doc = "Change the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &MutationObservingInfo, val: bool); + pub fn set_subtree(this: &MutationObservingInfo, val: bool); + #[cfg(feature = "Node")] + #[doc = "Get the `observedNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] + #[wasm_bindgen(method, getter = "observedNode")] + pub fn get_observed_node(this: &MutationObservingInfo) -> Option; #[cfg(feature = "Node")] + #[doc = "Change the `observedNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] #[wasm_bindgen(method, setter = "observedNode")] - fn observed_node_shim(this: &MutationObservingInfo, val: Option<&Node>); + pub fn set_observed_node(this: &MutationObservingInfo, val: Option<&Node>); } impl MutationObservingInfo { #[doc = "Construct a new `MutationObservingInfo`."] @@ -41,75 +122,55 @@ impl MutationObservingInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `animations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_animations()` instead."] pub fn animations(&mut self, val: bool) -> &mut Self { - self.animations_shim(val); + self.set_animations(val); self } - #[doc = "Change the `attributeFilter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attribute_filter()` instead."] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribute_filter_shim(val); + self.set_attribute_filter(val); self } - #[doc = "Change the `attributeOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attribute_old_value()` instead."] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { - self.attribute_old_value_shim(val); + self.set_attribute_old_value(val); self } - #[doc = "Change the `attributes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_attributes()` instead."] pub fn attributes(&mut self, val: bool) -> &mut Self { - self.attributes_shim(val); + self.set_attributes(val); self } - #[doc = "Change the `characterData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_character_data()` instead."] pub fn character_data(&mut self, val: bool) -> &mut Self { - self.character_data_shim(val); + self.set_character_data(val); self } - #[doc = "Change the `characterDataOldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_character_data_old_value()` instead."] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { - self.character_data_old_value_shim(val); + self.set_character_data_old_value(val); self } - #[doc = "Change the `childList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_child_list()` instead."] pub fn child_list(&mut self, val: bool) -> &mut Self { - self.child_list_shim(val); + self.set_child_list(val); self } - #[doc = "Change the `nativeAnonymousChildList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_native_anonymous_child_list()` instead."] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { - self.native_anonymous_child_list_shim(val); + self.set_native_anonymous_child_list(val); self } - #[doc = "Change the `subtree` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + #[deprecated = "Use `set_subtree()` instead."] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree(val); self } #[cfg(feature = "Node")] - #[doc = "Change the `observedNode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] + #[deprecated = "Use `set_observed_node()` instead."] pub fn observed_node(&mut self, val: Option<&Node>) -> &mut Self { - self.observed_node_shim(val); + self.set_observed_node(val); self } } diff --git a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs index 5245faddf78..7f8f52c40f6 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] pub type NativeOsFileReadOptions; + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[wasm_bindgen(method, getter = "bytes")] + pub fn get_bytes(this: &NativeOsFileReadOptions) -> Option; + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &NativeOsFileReadOptions, val: Option); + pub fn set_bytes(this: &NativeOsFileReadOptions, val: Option); + #[doc = "Get the `encoding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[wasm_bindgen(method, getter = "encoding")] + pub fn get_encoding(this: &NativeOsFileReadOptions) -> Option; + #[doc = "Change the `encoding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] #[wasm_bindgen(method, setter = "encoding")] - fn encoding_shim(this: &NativeOsFileReadOptions, val: Option<&str>); + pub fn set_encoding(this: &NativeOsFileReadOptions, val: Option<&str>); } impl NativeOsFileReadOptions { #[doc = "Construct a new `NativeOsFileReadOptions`."] @@ -24,18 +40,14 @@ impl NativeOsFileReadOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: Option) -> &mut Self { - self.bytes_shim(val); + self.set_bytes(val); self } - #[doc = "Change the `encoding` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + #[deprecated = "Use `set_encoding()` instead."] pub fn encoding(&mut self, val: Option<&str>) -> &mut Self { - self.encoding_shim(val); + self.set_encoding(val); self } } diff --git a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs index 7310b9a165b..6215a0b8529 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub type NativeOsFileWriteAtomicOptions; + #[doc = "Get the `backupTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[wasm_bindgen(method, getter = "backupTo")] + pub fn get_backup_to(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `backupTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "backupTo")] - fn backup_to_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + pub fn set_backup_to(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[wasm_bindgen(method, getter = "bytes")] + pub fn get_bytes(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &NativeOsFileWriteAtomicOptions, val: Option); + pub fn set_bytes(this: &NativeOsFileWriteAtomicOptions, val: Option); + #[doc = "Get the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[wasm_bindgen(method, getter = "flush")] + pub fn get_flush(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "flush")] - fn flush_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + pub fn set_flush(this: &NativeOsFileWriteAtomicOptions, val: bool); + #[doc = "Get the `noOverwrite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[wasm_bindgen(method, getter = "noOverwrite")] + pub fn get_no_overwrite(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `noOverwrite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "noOverwrite")] - fn no_overwrite_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + pub fn set_no_overwrite(this: &NativeOsFileWriteAtomicOptions, val: bool); + #[doc = "Get the `tmpPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[wasm_bindgen(method, getter = "tmpPath")] + pub fn get_tmp_path(this: &NativeOsFileWriteAtomicOptions) -> Option; + #[doc = "Change the `tmpPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] #[wasm_bindgen(method, setter = "tmpPath")] - fn tmp_path_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + pub fn set_tmp_path(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); } impl NativeOsFileWriteAtomicOptions { #[doc = "Construct a new `NativeOsFileWriteAtomicOptions`."] @@ -30,39 +70,29 @@ impl NativeOsFileWriteAtomicOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `backupTo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_backup_to()` instead."] pub fn backup_to(&mut self, val: Option<&str>) -> &mut Self { - self.backup_to_shim(val); + self.set_backup_to(val); self } - #[doc = "Change the `bytes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_bytes()` instead."] pub fn bytes(&mut self, val: Option) -> &mut Self { - self.bytes_shim(val); + self.set_bytes(val); self } - #[doc = "Change the `flush` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_flush()` instead."] pub fn flush(&mut self, val: bool) -> &mut Self { - self.flush_shim(val); + self.set_flush(val); self } - #[doc = "Change the `noOverwrite` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_no_overwrite()` instead."] pub fn no_overwrite(&mut self, val: bool) -> &mut Self { - self.no_overwrite_shim(val); + self.set_no_overwrite(val); self } - #[doc = "Change the `tmpPath` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + #[deprecated = "Use `set_tmp_path()` instead."] pub fn tmp_path(&mut self, val: Option<&str>) -> &mut Self { - self.tmp_path_shim(val); + self.set_tmp_path(val); self } } diff --git a/crates/web-sys/src/features/gen_NavigatorUaBrandVersion.rs b/crates/web-sys/src/features/gen_NavigatorUaBrandVersion.rs index 49e7ae06847..05be8c4f94f 100644 --- a/crates/web-sys/src/features/gen_NavigatorUaBrandVersion.rs +++ b/crates/web-sys/src/features/gen_NavigatorUaBrandVersion.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type NavigatorUaBrandVersion; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `brand` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "brand")] + pub fn get_brand(this: &NavigatorUaBrandVersion) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `brand` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "brand")] - fn brand_shim(this: &NavigatorUaBrandVersion, val: &str); + pub fn set_brand(this: &NavigatorUaBrandVersion, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &NavigatorUaBrandVersion) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &NavigatorUaBrandVersion, val: &str); + pub fn set_version(this: &NavigatorUaBrandVersion, val: &str); } #[cfg(web_sys_unstable_apis)] impl NavigatorUaBrandVersion { @@ -33,25 +65,15 @@ impl NavigatorUaBrandVersion { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `brand` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_brand()` instead."] pub fn brand(&mut self, val: &str) -> &mut Self { - self.brand_shim(val); + self.set_brand(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs index d90b1a5fcd7..0bac6a26bec 100644 --- a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs @@ -10,92 +10,436 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub type NetworkCommandOptions; + #[doc = "Get the `cmd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "cmd")] + pub fn get_cmd(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `cmd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "cmd")] - fn cmd_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_cmd(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "curExternalIfname")] + pub fn get_cur_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "curExternalIfname")] - fn cur_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_cur_external_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "curInternalIfname")] + pub fn get_cur_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "curInternalIfname")] - fn cur_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_cur_internal_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "dns1")] + pub fn get_dns1(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns1")] - fn dns1_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_dns1(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `dns1_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "dns1_long")] + pub fn get_dns1_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns1_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns1_long")] - fn dns1_long_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_dns1_long(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "dns2")] + pub fn get_dns2(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns2")] - fn dns2_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_dns2(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `dns2_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "dns2_long")] + pub fn get_dns2_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `dns2_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dns2_long")] - fn dns2_long_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_dns2_long(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `dnses` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "dnses")] + pub fn get_dnses(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `dnses` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "dnses")] - fn dnses_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_dnses(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "domain")] + pub fn get_domain(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "domain")] - fn domain_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_domain(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "enable")] + pub fn get_enable(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "enable")] - fn enable_shim(this: &NetworkCommandOptions, val: bool); + pub fn set_enable(this: &NetworkCommandOptions, val: bool); + #[doc = "Get the `enabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "enabled")] + pub fn get_enabled(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `enabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "enabled")] - fn enabled_shim(this: &NetworkCommandOptions, val: bool); + pub fn set_enabled(this: &NetworkCommandOptions, val: bool); + #[doc = "Get the `endIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "endIp")] + pub fn get_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `endIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "endIp")] - fn end_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_end_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `externalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "externalIfname")] + pub fn get_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `externalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "externalIfname")] - fn external_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_external_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "gateway")] + pub fn get_gateway(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateway")] - fn gateway_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_gateway(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `gateway_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "gateway_long")] + pub fn get_gateway_long(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `gateway_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateway_long")] - fn gateway_long_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_gateway_long(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `gateways` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "gateways")] + pub fn get_gateways(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `gateways` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "gateways")] - fn gateways_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_gateways(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_id(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `ifname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "ifname")] + pub fn get_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ifname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ifname")] - fn ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "interfaceList")] + pub fn get_interface_list(this: &NetworkCommandOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "interfaceList")] - fn interface_list_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + pub fn set_interface_list(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `internalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "internalIfname")] + pub fn get_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `internalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "internalIfname")] - fn internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_internal_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `ip` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "ip")] + pub fn get_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ip` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ip")] - fn ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "ipaddr")] + pub fn get_ipaddr(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ipaddr")] - fn ipaddr_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_ipaddr(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "key")] + pub fn get_key(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_key(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `link` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "link")] + pub fn get_link(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `link` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "link")] - fn link_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_link(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "mask")] + pub fn get_mask(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_mask(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `maskLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "maskLength")] + pub fn get_mask_length(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `maskLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "maskLength")] - fn mask_length_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_mask_length(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_mode(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `mtu` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "mtu")] + pub fn get_mtu(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `mtu` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "mtu")] - fn mtu_shim(this: &NetworkCommandOptions, val: i32); + pub fn set_mtu(this: &NetworkCommandOptions, val: i32); + #[doc = "Get the `preExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "preExternalIfname")] + pub fn get_pre_external_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `preExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "preExternalIfname")] - fn pre_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_pre_external_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `preInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "preInternalIfname")] + pub fn get_pre_internal_ifname(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `preInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "preInternalIfname")] - fn pre_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_pre_internal_ifname(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "prefix")] + pub fn get_prefix(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_prefix(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "prefixLength")] + pub fn get_prefix_length(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "prefixLength")] - fn prefix_length_shim(this: &NetworkCommandOptions, val: u32); + pub fn set_prefix_length(this: &NetworkCommandOptions, val: u32); + #[doc = "Get the `report` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "report")] + pub fn get_report(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `report` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "report")] - fn report_shim(this: &NetworkCommandOptions, val: bool); + pub fn set_report(this: &NetworkCommandOptions, val: bool); + #[doc = "Get the `security` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "security")] + pub fn get_security(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `security` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "security")] - fn security_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_security(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `serverIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "serverIp")] + pub fn get_server_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `serverIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "serverIp")] - fn server_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_server_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `ssid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "ssid")] + pub fn get_ssid(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `ssid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "ssid")] - fn ssid_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_ssid(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `startIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "startIp")] + pub fn get_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `startIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "startIp")] - fn start_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_start_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "threshold")] + pub fn get_threshold(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &NetworkCommandOptions, val: f64); + pub fn set_threshold(this: &NetworkCommandOptions, val: f64); + #[doc = "Get the `usbEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "usbEndIp")] + pub fn get_usb_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `usbEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "usbEndIp")] - fn usb_end_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_usb_end_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `usbStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "usbStartIp")] + pub fn get_usb_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `usbStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "usbStartIp")] - fn usb_start_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_usb_start_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `wifiEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "wifiEndIp")] + pub fn get_wifi_end_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifiEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifiEndIp")] - fn wifi_end_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_wifi_end_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `wifiStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "wifiStartIp")] + pub fn get_wifi_start_ip(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifiStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifiStartIp")] - fn wifi_start_ip_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_wifi_start_ip(this: &NetworkCommandOptions, val: &str); + #[doc = "Get the `wifictrlinterfacename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[wasm_bindgen(method, getter = "wifictrlinterfacename")] + pub fn get_wifictrlinterfacename(this: &NetworkCommandOptions) -> Option; + #[doc = "Change the `wifictrlinterfacename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] #[wasm_bindgen(method, setter = "wifictrlinterfacename")] - fn wifictrlinterfacename_shim(this: &NetworkCommandOptions, val: &str); + pub fn set_wifictrlinterfacename(this: &NetworkCommandOptions, val: &str); } impl NetworkCommandOptions { #[doc = "Construct a new `NetworkCommandOptions`."] @@ -106,305 +450,219 @@ impl NetworkCommandOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cmd` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cmd()` instead."] pub fn cmd(&mut self, val: &str) -> &mut Self { - self.cmd_shim(val); + self.set_cmd(val); self } - #[doc = "Change the `curExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cur_external_ifname()` instead."] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { - self.cur_external_ifname_shim(val); + self.set_cur_external_ifname(val); self } - #[doc = "Change the `curInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_cur_internal_ifname()` instead."] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { - self.cur_internal_ifname_shim(val); + self.set_cur_internal_ifname(val); self } - #[doc = "Change the `dns1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns1()` instead."] pub fn dns1(&mut self, val: &str) -> &mut Self { - self.dns1_shim(val); + self.set_dns1(val); self } - #[doc = "Change the `dns1_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns1_long()` instead."] pub fn dns1_long(&mut self, val: i32) -> &mut Self { - self.dns1_long_shim(val); + self.set_dns1_long(val); self } - #[doc = "Change the `dns2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns2()` instead."] pub fn dns2(&mut self, val: &str) -> &mut Self { - self.dns2_shim(val); + self.set_dns2(val); self } - #[doc = "Change the `dns2_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dns2_long()` instead."] pub fn dns2_long(&mut self, val: i32) -> &mut Self { - self.dns2_long_shim(val); + self.set_dns2_long(val); self } - #[doc = "Change the `dnses` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_dnses()` instead."] pub fn dnses(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.dnses_shim(val); + self.set_dnses(val); self } - #[doc = "Change the `domain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_domain()` instead."] pub fn domain(&mut self, val: &str) -> &mut Self { - self.domain_shim(val); + self.set_domain(val); self } - #[doc = "Change the `enable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_enable()` instead."] pub fn enable(&mut self, val: bool) -> &mut Self { - self.enable_shim(val); + self.set_enable(val); self } - #[doc = "Change the `enabled` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_enabled()` instead."] pub fn enabled(&mut self, val: bool) -> &mut Self { - self.enabled_shim(val); + self.set_enabled(val); self } - #[doc = "Change the `endIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_end_ip()` instead."] pub fn end_ip(&mut self, val: &str) -> &mut Self { - self.end_ip_shim(val); + self.set_end_ip(val); self } - #[doc = "Change the `externalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_external_ifname()` instead."] pub fn external_ifname(&mut self, val: &str) -> &mut Self { - self.external_ifname_shim(val); + self.set_external_ifname(val); self } - #[doc = "Change the `gateway` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateway()` instead."] pub fn gateway(&mut self, val: &str) -> &mut Self { - self.gateway_shim(val); + self.set_gateway(val); self } - #[doc = "Change the `gateway_long` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateway_long()` instead."] pub fn gateway_long(&mut self, val: i32) -> &mut Self { - self.gateway_long_shim(val); + self.set_gateway_long(val); self } - #[doc = "Change the `gateways` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_gateways()` instead."] pub fn gateways(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.gateways_shim(val); + self.set_gateways(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: i32) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `ifname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ifname()` instead."] pub fn ifname(&mut self, val: &str) -> &mut Self { - self.ifname_shim(val); + self.set_ifname(val); self } - #[doc = "Change the `interfaceList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_interface_list()` instead."] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interface_list_shim(val); + self.set_interface_list(val); self } - #[doc = "Change the `internalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_internal_ifname()` instead."] pub fn internal_ifname(&mut self, val: &str) -> &mut Self { - self.internal_ifname_shim(val); + self.set_internal_ifname(val); self } - #[doc = "Change the `ip` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ip()` instead."] pub fn ip(&mut self, val: &str) -> &mut Self { - self.ip_shim(val); + self.set_ip(val); self } - #[doc = "Change the `ipaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ipaddr()` instead."] pub fn ipaddr(&mut self, val: i32) -> &mut Self { - self.ipaddr_shim(val); + self.set_ipaddr(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: &str) -> &mut Self { - self.key_shim(val); + self.set_key(val); self } - #[doc = "Change the `link` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_link()` instead."] pub fn link(&mut self, val: &str) -> &mut Self { - self.link_shim(val); + self.set_link(val); self } - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: i32) -> &mut Self { - self.mask_shim(val); + self.set_mask(val); self } - #[doc = "Change the `maskLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mask_length()` instead."] pub fn mask_length(&mut self, val: &str) -> &mut Self { - self.mask_length_shim(val); + self.set_mask_length(val); self } - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: &str) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } - #[doc = "Change the `mtu` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_mtu()` instead."] pub fn mtu(&mut self, val: i32) -> &mut Self { - self.mtu_shim(val); + self.set_mtu(val); self } - #[doc = "Change the `preExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_pre_external_ifname()` instead."] pub fn pre_external_ifname(&mut self, val: &str) -> &mut Self { - self.pre_external_ifname_shim(val); + self.set_pre_external_ifname(val); self } - #[doc = "Change the `preInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_pre_internal_ifname()` instead."] pub fn pre_internal_ifname(&mut self, val: &str) -> &mut Self { - self.pre_internal_ifname_shim(val); + self.set_pre_internal_ifname(val); self } - #[doc = "Change the `prefix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_prefix()` instead."] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix(val); self } - #[doc = "Change the `prefixLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_prefix_length()` instead."] pub fn prefix_length(&mut self, val: u32) -> &mut Self { - self.prefix_length_shim(val); + self.set_prefix_length(val); self } - #[doc = "Change the `report` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_report()` instead."] pub fn report(&mut self, val: bool) -> &mut Self { - self.report_shim(val); + self.set_report(val); self } - #[doc = "Change the `security` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_security()` instead."] pub fn security(&mut self, val: &str) -> &mut Self { - self.security_shim(val); + self.set_security(val); self } - #[doc = "Change the `serverIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_server_ip()` instead."] pub fn server_ip(&mut self, val: &str) -> &mut Self { - self.server_ip_shim(val); + self.set_server_ip(val); self } - #[doc = "Change the `ssid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_ssid()` instead."] pub fn ssid(&mut self, val: &str) -> &mut Self { - self.ssid_shim(val); + self.set_ssid(val); self } - #[doc = "Change the `startIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_start_ip()` instead."] pub fn start_ip(&mut self, val: &str) -> &mut Self { - self.start_ip_shim(val); + self.set_start_ip(val); self } - #[doc = "Change the `threshold` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_threshold()` instead."] pub fn threshold(&mut self, val: f64) -> &mut Self { - self.threshold_shim(val); + self.set_threshold(val); self } - #[doc = "Change the `usbEndIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_usb_end_ip()` instead."] pub fn usb_end_ip(&mut self, val: &str) -> &mut Self { - self.usb_end_ip_shim(val); + self.set_usb_end_ip(val); self } - #[doc = "Change the `usbStartIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_usb_start_ip()` instead."] pub fn usb_start_ip(&mut self, val: &str) -> &mut Self { - self.usb_start_ip_shim(val); + self.set_usb_start_ip(val); self } - #[doc = "Change the `wifiEndIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifi_end_ip()` instead."] pub fn wifi_end_ip(&mut self, val: &str) -> &mut Self { - self.wifi_end_ip_shim(val); + self.set_wifi_end_ip(val); self } - #[doc = "Change the `wifiStartIp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifi_start_ip()` instead."] pub fn wifi_start_ip(&mut self, val: &str) -> &mut Self { - self.wifi_start_ip_shim(val); + self.set_wifi_start_ip(val); self } - #[doc = "Change the `wifictrlinterfacename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + #[deprecated = "Use `set_wifictrlinterfacename()` instead."] pub fn wifictrlinterfacename(&mut self, val: &str) -> &mut Self { - self.wifictrlinterfacename_shim(val); + self.set_wifictrlinterfacename(val); self } } diff --git a/crates/web-sys/src/features/gen_NetworkResultOptions.rs b/crates/web-sys/src/features/gen_NetworkResultOptions.rs index 10662e3b521..4f456605968 100644 --- a/crates/web-sys/src/features/gen_NetworkResultOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkResultOptions.rs @@ -10,76 +10,356 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub type NetworkResultOptions; + #[doc = "Get the `broadcast` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "broadcast")] + pub fn get_broadcast(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `broadcast` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "broadcast")] - fn broadcast_shim(this: &NetworkResultOptions, val: bool); + pub fn set_broadcast(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "curExternalIfname")] + pub fn get_cur_external_ifname(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "curExternalIfname")] - fn cur_external_ifname_shim(this: &NetworkResultOptions, val: &str); + pub fn set_cur_external_ifname(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "curInternalIfname")] + pub fn get_cur_internal_ifname(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "curInternalIfname")] - fn cur_internal_ifname_shim(this: &NetworkResultOptions, val: &str); + pub fn set_cur_internal_ifname(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "dns1")] + pub fn get_dns1(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns1")] - fn dns1_shim(this: &NetworkResultOptions, val: i32); + pub fn set_dns1(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `dns1_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "dns1_str")] + pub fn get_dns1_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns1_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns1_str")] - fn dns1_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_dns1_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "dns2")] + pub fn get_dns2(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns2")] - fn dns2_shim(this: &NetworkResultOptions, val: i32); + pub fn set_dns2(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `dns2_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "dns2_str")] + pub fn get_dns2_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `dns2_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "dns2_str")] - fn dns2_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_dns2_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "enable")] + pub fn get_enable(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "enable")] - fn enable_shim(this: &NetworkResultOptions, val: bool); + pub fn set_enable(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &NetworkResultOptions, val: bool); + pub fn set_error(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `flag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "flag")] + pub fn get_flag(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `flag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "flag")] - fn flag_shim(this: &NetworkResultOptions, val: &str); + pub fn set_flag(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "gateway")] + pub fn get_gateway(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "gateway")] - fn gateway_shim(this: &NetworkResultOptions, val: i32); + pub fn set_gateway(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `gateway_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "gateway_str")] + pub fn get_gateway_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `gateway_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "gateway_str")] - fn gateway_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_gateway_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &NetworkResultOptions, val: i32); + pub fn set_id(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "interfaceList")] + pub fn get_interface_list(this: &NetworkResultOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "interfaceList")] - fn interface_list_shim(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); + pub fn set_interface_list(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `ipAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "ipAddr")] + pub fn get_ip_addr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipAddr")] - fn ip_addr_shim(this: &NetworkResultOptions, val: &str); + pub fn set_ip_addr(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "ipaddr")] + pub fn get_ipaddr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipaddr")] - fn ipaddr_shim(this: &NetworkResultOptions, val: i32); + pub fn set_ipaddr(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `ipaddr_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "ipaddr_str")] + pub fn get_ipaddr_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ipaddr_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ipaddr_str")] - fn ipaddr_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_ipaddr_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `lease` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "lease")] + pub fn get_lease(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `lease` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "lease")] - fn lease_shim(this: &NetworkResultOptions, val: i32); + pub fn set_lease(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `macAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "macAddr")] + pub fn get_mac_addr(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `macAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "macAddr")] - fn mac_addr_shim(this: &NetworkResultOptions, val: &str); + pub fn set_mac_addr(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "mask")] + pub fn get_mask(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &NetworkResultOptions, val: i32); + pub fn set_mask(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `mask_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "mask_str")] + pub fn get_mask_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `mask_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "mask_str")] - fn mask_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_mask_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `netId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "netId")] + pub fn get_net_id(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `netId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "netId")] - fn net_id_shim(this: &NetworkResultOptions, val: &str); + pub fn set_net_id(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "prefixLength")] + pub fn get_prefix_length(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "prefixLength")] - fn prefix_length_shim(this: &NetworkResultOptions, val: i32); + pub fn set_prefix_length(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &NetworkResultOptions, val: &str); + pub fn set_reason(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `reply` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "reply")] + pub fn get_reply(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `reply` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "reply")] - fn reply_shim(this: &NetworkResultOptions, val: &str); + pub fn set_reply(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `result` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "result")] + pub fn get_result(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `result` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "result")] - fn result_shim(this: &NetworkResultOptions, val: bool); + pub fn set_result(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `resultCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "resultCode")] + pub fn get_result_code(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `resultCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "resultCode")] - fn result_code_shim(this: &NetworkResultOptions, val: i32); + pub fn set_result_code(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `resultReason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "resultReason")] + pub fn get_result_reason(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `resultReason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "resultReason")] - fn result_reason_shim(this: &NetworkResultOptions, val: &str); + pub fn set_result_reason(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `ret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "ret")] + pub fn get_ret(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `ret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "ret")] - fn ret_shim(this: &NetworkResultOptions, val: bool); + pub fn set_ret(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `route` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "route")] + pub fn get_route(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `route` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "route")] - fn route_shim(this: &NetworkResultOptions, val: &str); + pub fn set_route(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `server` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "server")] + pub fn get_server(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `server` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "server")] - fn server_shim(this: &NetworkResultOptions, val: i32); + pub fn set_server(this: &NetworkResultOptions, val: i32); + #[doc = "Get the `server_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "server_str")] + pub fn get_server_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `server_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "server_str")] - fn server_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_server_str(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `success` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "success")] + pub fn get_success(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `success` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "success")] - fn success_shim(this: &NetworkResultOptions, val: bool); + pub fn set_success(this: &NetworkResultOptions, val: bool); + #[doc = "Get the `topic` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "topic")] + pub fn get_topic(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `topic` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "topic")] - fn topic_shim(this: &NetworkResultOptions, val: &str); + pub fn set_topic(this: &NetworkResultOptions, val: &str); + #[doc = "Get the `vendor_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[wasm_bindgen(method, getter = "vendor_str")] + pub fn get_vendor_str(this: &NetworkResultOptions) -> Option; + #[doc = "Change the `vendor_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] #[wasm_bindgen(method, setter = "vendor_str")] - fn vendor_str_shim(this: &NetworkResultOptions, val: &str); + pub fn set_vendor_str(this: &NetworkResultOptions, val: &str); } impl NetworkResultOptions { #[doc = "Construct a new `NetworkResultOptions`."] @@ -90,249 +370,179 @@ impl NetworkResultOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `broadcast` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_broadcast()` instead."] pub fn broadcast(&mut self, val: bool) -> &mut Self { - self.broadcast_shim(val); + self.set_broadcast(val); self } - #[doc = "Change the `curExternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_cur_external_ifname()` instead."] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { - self.cur_external_ifname_shim(val); + self.set_cur_external_ifname(val); self } - #[doc = "Change the `curInternalIfname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_cur_internal_ifname()` instead."] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { - self.cur_internal_ifname_shim(val); + self.set_cur_internal_ifname(val); self } - #[doc = "Change the `dns1` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns1()` instead."] pub fn dns1(&mut self, val: i32) -> &mut Self { - self.dns1_shim(val); + self.set_dns1(val); self } - #[doc = "Change the `dns1_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns1_str()` instead."] pub fn dns1_str(&mut self, val: &str) -> &mut Self { - self.dns1_str_shim(val); + self.set_dns1_str(val); self } - #[doc = "Change the `dns2` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns2()` instead."] pub fn dns2(&mut self, val: i32) -> &mut Self { - self.dns2_shim(val); + self.set_dns2(val); self } - #[doc = "Change the `dns2_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_dns2_str()` instead."] pub fn dns2_str(&mut self, val: &str) -> &mut Self { - self.dns2_str_shim(val); + self.set_dns2_str(val); self } - #[doc = "Change the `enable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_enable()` instead."] pub fn enable(&mut self, val: bool) -> &mut Self { - self.enable_shim(val); + self.set_enable(val); self } - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: bool) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } - #[doc = "Change the `flag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_flag()` instead."] pub fn flag(&mut self, val: &str) -> &mut Self { - self.flag_shim(val); + self.set_flag(val); self } - #[doc = "Change the `gateway` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_gateway()` instead."] pub fn gateway(&mut self, val: i32) -> &mut Self { - self.gateway_shim(val); + self.set_gateway(val); self } - #[doc = "Change the `gateway_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_gateway_str()` instead."] pub fn gateway_str(&mut self, val: &str) -> &mut Self { - self.gateway_str_shim(val); + self.set_gateway_str(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: i32) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `interfaceList` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_interface_list()` instead."] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interface_list_shim(val); + self.set_interface_list(val); self } - #[doc = "Change the `ipAddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ip_addr()` instead."] pub fn ip_addr(&mut self, val: &str) -> &mut Self { - self.ip_addr_shim(val); + self.set_ip_addr(val); self } - #[doc = "Change the `ipaddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ipaddr()` instead."] pub fn ipaddr(&mut self, val: i32) -> &mut Self { - self.ipaddr_shim(val); + self.set_ipaddr(val); self } - #[doc = "Change the `ipaddr_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ipaddr_str()` instead."] pub fn ipaddr_str(&mut self, val: &str) -> &mut Self { - self.ipaddr_str_shim(val); + self.set_ipaddr_str(val); self } - #[doc = "Change the `lease` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_lease()` instead."] pub fn lease(&mut self, val: i32) -> &mut Self { - self.lease_shim(val); + self.set_lease(val); self } - #[doc = "Change the `macAddr` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mac_addr()` instead."] pub fn mac_addr(&mut self, val: &str) -> &mut Self { - self.mac_addr_shim(val); + self.set_mac_addr(val); self } - #[doc = "Change the `mask` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mask()` instead."] pub fn mask(&mut self, val: i32) -> &mut Self { - self.mask_shim(val); + self.set_mask(val); self } - #[doc = "Change the `mask_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_mask_str()` instead."] pub fn mask_str(&mut self, val: &str) -> &mut Self { - self.mask_str_shim(val); + self.set_mask_str(val); self } - #[doc = "Change the `netId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_net_id()` instead."] pub fn net_id(&mut self, val: &str) -> &mut Self { - self.net_id_shim(val); + self.set_net_id(val); self } - #[doc = "Change the `prefixLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_prefix_length()` instead."] pub fn prefix_length(&mut self, val: i32) -> &mut Self { - self.prefix_length_shim(val); + self.set_prefix_length(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } - #[doc = "Change the `reply` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_reply()` instead."] pub fn reply(&mut self, val: &str) -> &mut Self { - self.reply_shim(val); + self.set_reply(val); self } - #[doc = "Change the `result` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result()` instead."] pub fn result(&mut self, val: bool) -> &mut Self { - self.result_shim(val); + self.set_result(val); self } - #[doc = "Change the `resultCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result_code()` instead."] pub fn result_code(&mut self, val: i32) -> &mut Self { - self.result_code_shim(val); + self.set_result_code(val); self } - #[doc = "Change the `resultReason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_result_reason()` instead."] pub fn result_reason(&mut self, val: &str) -> &mut Self { - self.result_reason_shim(val); + self.set_result_reason(val); self } - #[doc = "Change the `ret` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_ret()` instead."] pub fn ret(&mut self, val: bool) -> &mut Self { - self.ret_shim(val); + self.set_ret(val); self } - #[doc = "Change the `route` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_route()` instead."] pub fn route(&mut self, val: &str) -> &mut Self { - self.route_shim(val); + self.set_route(val); self } - #[doc = "Change the `server` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_server()` instead."] pub fn server(&mut self, val: i32) -> &mut Self { - self.server_shim(val); + self.set_server(val); self } - #[doc = "Change the `server_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_server_str()` instead."] pub fn server_str(&mut self, val: &str) -> &mut Self { - self.server_str_shim(val); + self.set_server_str(val); self } - #[doc = "Change the `success` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_success()` instead."] pub fn success(&mut self, val: bool) -> &mut Self { - self.success_shim(val); + self.set_success(val); self } - #[doc = "Change the `topic` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_topic()` instead."] pub fn topic(&mut self, val: &str) -> &mut Self { - self.topic_shim(val); + self.set_topic(val); self } - #[doc = "Change the `vendor_str` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + #[deprecated = "Use `set_vendor_str()` instead."] pub fn vendor_str(&mut self, val: &str) -> &mut Self { - self.vendor_str_shim(val); + self.set_vendor_str(val); self } } diff --git a/crates/web-sys/src/features/gen_NodeFilter.rs b/crates/web-sys/src/features/gen_NodeFilter.rs index 9f41f29e589..dfc7bbf68f0 100644 --- a/crates/web-sys/src/features/gen_NodeFilter.rs +++ b/crates/web-sys/src/features/gen_NodeFilter.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] pub type NodeFilter; + #[doc = "Get the `acceptNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] + #[wasm_bindgen(method, getter = "acceptNode")] + pub fn get_accept_node(this: &NodeFilter) -> Option<::js_sys::Function>; + #[doc = "Change the `acceptNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] #[wasm_bindgen(method, setter = "acceptNode")] - fn accept_node_shim(this: &NodeFilter, val: &::js_sys::Function); + pub fn set_accept_node(this: &NodeFilter, val: &::js_sys::Function); } impl NodeFilter { #[doc = "Construct a new `NodeFilter`."] @@ -22,11 +30,9 @@ impl NodeFilter { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `acceptNode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] + #[deprecated = "Use `set_accept_node()` instead."] pub fn accept_node(&mut self, val: &::js_sys::Function) -> &mut Self { - self.accept_node_shim(val); + self.set_accept_node(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationAction.rs b/crates/web-sys/src/features/gen_NotificationAction.rs index 24bfb4d8b22..f8fee81d848 100644 --- a/crates/web-sys/src/features/gen_NotificationAction.rs +++ b/crates/web-sys/src/features/gen_NotificationAction.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] pub type NotificationAction; + #[doc = "Get the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[wasm_bindgen(method, getter = "action")] + pub fn get_action(this: &NotificationAction) -> String; + #[doc = "Change the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &NotificationAction, val: &str); + pub fn set_action(this: &NotificationAction, val: &str); + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[wasm_bindgen(method, getter = "icon")] + pub fn get_icon(this: &NotificationAction) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &NotificationAction, val: &str); + pub fn set_icon(this: &NotificationAction, val: &str); + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[wasm_bindgen(method, getter = "title")] + pub fn get_title(this: &NotificationAction) -> String; + #[doc = "Change the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &NotificationAction, val: &str); + pub fn set_title(this: &NotificationAction, val: &str); } impl NotificationAction { #[doc = "Construct a new `NotificationAction`."] @@ -28,25 +52,19 @@ impl NotificationAction { ret.title(title); ret } - #[doc = "Change the `action` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_action()` instead."] pub fn action(&mut self, val: &str) -> &mut Self { - self.action_shim(val); + self.set_action(val); self } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon(val); self } - #[doc = "Change the `title` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationEventInit.rs b/crates/web-sys/src/features/gen_NotificationEventInit.rs index 6e73ccc7bf2..c7b748a391f 100644 --- a/crates/web-sys/src/features/gen_NotificationEventInit.rs +++ b/crates/web-sys/src/features/gen_NotificationEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] pub type NotificationEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &NotificationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &NotificationEventInit, val: bool); + pub fn set_bubbles(this: &NotificationEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &NotificationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &NotificationEventInit, val: bool); + pub fn set_cancelable(this: &NotificationEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &NotificationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &NotificationEventInit, val: bool); + pub fn set_composed(this: &NotificationEventInit, val: bool); #[cfg(feature = "Notification")] + #[doc = "Get the `notification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] + #[wasm_bindgen(method, getter = "notification")] + pub fn get_notification(this: &NotificationEventInit) -> Notification; + #[cfg(feature = "Notification")] + #[doc = "Change the `notification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] #[wasm_bindgen(method, setter = "notification")] - fn notification_shim(this: &NotificationEventInit, val: &Notification); + pub fn set_notification(this: &NotificationEventInit, val: &Notification); } impl NotificationEventInit { #[cfg(feature = "Notification")] @@ -31,33 +64,25 @@ impl NotificationEventInit { ret.notification(notification); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Notification")] - #[doc = "Change the `notification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] + #[deprecated = "Use `set_notification()` instead."] pub fn notification(&mut self, val: &Notification) -> &mut Self { - self.notification_shim(val); + self.set_notification(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationOptions.rs b/crates/web-sys/src/features/gen_NotificationOptions.rs index cd07eebe53a..c8e8bc9ccba 100644 --- a/crates/web-sys/src/features/gen_NotificationOptions.rs +++ b/crates/web-sys/src/features/gen_NotificationOptions.rs @@ -10,33 +10,138 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub type NotificationOptions; + #[doc = "Get the `actions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "actions")] + pub fn get_actions(this: &NotificationOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `actions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "actions")] - fn actions_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + pub fn set_actions(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `badge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "badge")] + pub fn get_badge(this: &NotificationOptions) -> Option; + #[doc = "Change the `badge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "badge")] - fn badge_shim(this: &NotificationOptions, val: &str); + pub fn set_badge(this: &NotificationOptions, val: &str); + #[doc = "Get the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "body")] + pub fn get_body(this: &NotificationOptions) -> Option; + #[doc = "Change the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "body")] - fn body_shim(this: &NotificationOptions, val: &str); + pub fn set_body(this: &NotificationOptions, val: &str); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &NotificationOptions) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); #[cfg(feature = "NotificationDirection")] + #[doc = "Get the `dir` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "dir")] + pub fn get_dir(this: &NotificationOptions) -> Option; + #[cfg(feature = "NotificationDirection")] + #[doc = "Change the `dir` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] #[wasm_bindgen(method, setter = "dir")] - fn dir_shim(this: &NotificationOptions, val: NotificationDirection); + pub fn set_dir(this: &NotificationOptions, val: NotificationDirection); + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "icon")] + pub fn get_icon(this: &NotificationOptions) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &NotificationOptions, val: &str); + pub fn set_icon(this: &NotificationOptions, val: &str); + #[doc = "Get the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "image")] + pub fn get_image(this: &NotificationOptions) -> Option; + #[doc = "Change the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "image")] - fn image_shim(this: &NotificationOptions, val: &str); + pub fn set_image(this: &NotificationOptions, val: &str); + #[doc = "Get the `lang` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "lang")] + pub fn get_lang(this: &NotificationOptions) -> Option; + #[doc = "Change the `lang` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "lang")] - fn lang_shim(this: &NotificationOptions, val: &str); + pub fn set_lang(this: &NotificationOptions, val: &str); + #[doc = "Get the `renotify` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "renotify")] + pub fn get_renotify(this: &NotificationOptions) -> Option; + #[doc = "Change the `renotify` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "renotify")] - fn renotify_shim(this: &NotificationOptions, val: bool); + pub fn set_renotify(this: &NotificationOptions, val: bool); + #[doc = "Get the `requireInteraction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "requireInteraction")] + pub fn get_require_interaction(this: &NotificationOptions) -> Option; + #[doc = "Change the `requireInteraction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "requireInteraction")] - fn require_interaction_shim(this: &NotificationOptions, val: bool); + pub fn set_require_interaction(this: &NotificationOptions, val: bool); + #[doc = "Get the `silent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "silent")] + pub fn get_silent(this: &NotificationOptions) -> Option; + #[doc = "Change the `silent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "silent")] - fn silent_shim(this: &NotificationOptions, val: Option); + pub fn set_silent(this: &NotificationOptions, val: Option); + #[doc = "Get the `tag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "tag")] + pub fn get_tag(this: &NotificationOptions) -> Option; + #[doc = "Change the `tag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "tag")] - fn tag_shim(this: &NotificationOptions, val: &str); + pub fn set_tag(this: &NotificationOptions, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &NotificationOptions) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &NotificationOptions, val: f64); + pub fn set_timestamp(this: &NotificationOptions, val: f64); } impl NotificationOptions { #[doc = "Construct a new `NotificationOptions`."] @@ -47,96 +152,70 @@ impl NotificationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `actions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_actions()` instead."] pub fn actions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.actions_shim(val); + self.set_actions(val); self } - #[doc = "Change the `badge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_badge()` instead."] pub fn badge(&mut self, val: &str) -> &mut Self { - self.badge_shim(val); + self.set_badge(val); self } - #[doc = "Change the `body` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_body()` instead."] pub fn body(&mut self, val: &str) -> &mut Self { - self.body_shim(val); + self.set_body(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } #[cfg(feature = "NotificationDirection")] - #[doc = "Change the `dir` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] + #[deprecated = "Use `set_dir()` instead."] pub fn dir(&mut self, val: NotificationDirection) -> &mut Self { - self.dir_shim(val); + self.set_dir(val); self } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon(val); self } - #[doc = "Change the `image` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_image()` instead."] pub fn image(&mut self, val: &str) -> &mut Self { - self.image_shim(val); + self.set_image(val); self } - #[doc = "Change the `lang` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_lang()` instead."] pub fn lang(&mut self, val: &str) -> &mut Self { - self.lang_shim(val); + self.set_lang(val); self } - #[doc = "Change the `renotify` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_renotify()` instead."] pub fn renotify(&mut self, val: bool) -> &mut Self { - self.renotify_shim(val); + self.set_renotify(val); self } - #[doc = "Change the `requireInteraction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_require_interaction()` instead."] pub fn require_interaction(&mut self, val: bool) -> &mut Self { - self.require_interaction_shim(val); + self.set_require_interaction(val); self } - #[doc = "Change the `silent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_silent()` instead."] pub fn silent(&mut self, val: Option) -> &mut Self { - self.silent_shim(val); + self.set_silent(val); self } - #[doc = "Change the `tag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_tag()` instead."] pub fn tag(&mut self, val: &str) -> &mut Self { - self.tag_shim(val); + self.set_tag(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_ObserverCallback.rs b/crates/web-sys/src/features/gen_ObserverCallback.rs index 6136af2a956..8fa10f9d7da 100644 --- a/crates/web-sys/src/features/gen_ObserverCallback.rs +++ b/crates/web-sys/src/features/gen_ObserverCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] pub type ObserverCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &ObserverCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &ObserverCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &ObserverCallback, val: &::js_sys::Function); } impl ObserverCallback { #[doc = "Construct a new `ObserverCallback`."] @@ -22,11 +30,9 @@ impl ObserverCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs index dc607168d11..45043ee73a7 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] pub type OfflineAudioCompletionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_bubbles(this: &OfflineAudioCompletionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_cancelable(this: &OfflineAudioCompletionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &OfflineAudioCompletionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &OfflineAudioCompletionEventInit, val: bool); + pub fn set_composed(this: &OfflineAudioCompletionEventInit, val: bool); #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `renderedBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] + #[wasm_bindgen(method, getter = "renderedBuffer")] + pub fn get_rendered_buffer(this: &OfflineAudioCompletionEventInit) -> AudioBuffer; + #[cfg(feature = "AudioBuffer")] + #[doc = "Change the `renderedBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] #[wasm_bindgen(method, setter = "renderedBuffer")] - fn rendered_buffer_shim(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); + pub fn set_rendered_buffer(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); } impl OfflineAudioCompletionEventInit { #[cfg(feature = "AudioBuffer")] @@ -31,33 +64,25 @@ impl OfflineAudioCompletionEventInit { ret.rendered_buffer(rendered_buffer); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "AudioBuffer")] - #[doc = "Change the `renderedBuffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] + #[deprecated = "Use `set_rendered_buffer()` instead."] pub fn rendered_buffer(&mut self, val: &AudioBuffer) -> &mut Self { - self.rendered_buffer_shim(val); + self.set_rendered_buffer(val); self } } diff --git a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs index a60ff33bc11..b1fd7829e6c 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] pub type OfflineAudioContextOptions; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[wasm_bindgen(method, getter = "length")] + pub fn get_length(this: &OfflineAudioContextOptions) -> u32; + #[doc = "Change the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &OfflineAudioContextOptions, val: u32); + pub fn set_length(this: &OfflineAudioContextOptions, val: u32); + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[wasm_bindgen(method, getter = "numberOfChannels")] + pub fn get_number_of_channels(this: &OfflineAudioContextOptions) -> Option; + #[doc = "Change the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &OfflineAudioContextOptions, val: u32); + pub fn set_number_of_channels(this: &OfflineAudioContextOptions, val: u32); + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[wasm_bindgen(method, getter = "sampleRate")] + pub fn get_sample_rate(this: &OfflineAudioContextOptions) -> f32; + #[doc = "Change the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &OfflineAudioContextOptions, val: f32); + pub fn set_sample_rate(this: &OfflineAudioContextOptions, val: f32); } impl OfflineAudioContextOptions { #[doc = "Construct a new `OfflineAudioContextOptions`."] @@ -28,25 +52,19 @@ impl OfflineAudioContextOptions { ret.sample_rate(sample_rate); ret } - #[doc = "Change the `length` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_length()` instead."] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length(val); self } - #[doc = "Change the `numberOfChannels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_number_of_channels()` instead."] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels(val); self } - #[doc = "Change the `sampleRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + #[deprecated = "Use `set_sample_rate()` instead."] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate(val); self } } diff --git a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs index 533bef161de..512cc7bcace 100644 --- a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type OpenFilePickerOptions; - #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &OpenFilePickerOptions, val: bool); - #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &OpenFilePickerOptions, val: &str); - #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "multiple")] - fn multiple_shim(this: &OpenFilePickerOptions, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl OpenFilePickerOptions { - #[doc = "Construct a new `OpenFilePickerOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + pub fn get_exclude_accept_all_option(this: &OpenFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `excludeAcceptAllOption` field of this object."] #[doc = ""] @@ -45,10 +30,17 @@ impl OpenFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); - self - } + #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] + pub fn set_exclude_accept_all_option(this: &OpenFilePickerOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &OpenFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `id` field of this object."] #[doc = ""] @@ -56,10 +48,17 @@ impl OpenFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); - self - } + #[wasm_bindgen(method, setter = "id")] + pub fn set_id(this: &OpenFilePickerOptions, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "startIn")] + pub fn get_start_in(this: &OpenFilePickerOptions) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `startIn` field of this object."] #[doc = ""] @@ -67,10 +66,17 @@ impl OpenFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); - self - } + #[wasm_bindgen(method, setter = "startIn")] + pub fn set_start_in(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "types")] + pub fn get_types(this: &OpenFilePickerOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `types` field of this object."] #[doc = ""] @@ -78,10 +84,17 @@ impl OpenFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); - self - } + #[wasm_bindgen(method, setter = "types")] + pub fn set_types(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `multiple` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "multiple")] + pub fn get_multiple(this: &OpenFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `multiple` field of this object."] #[doc = ""] @@ -89,8 +102,50 @@ impl OpenFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "multiple")] + pub fn set_multiple(this: &OpenFilePickerOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl OpenFilePickerOptions { + #[doc = "Construct a new `OpenFilePickerOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] + pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { + self.set_exclude_accept_all_option(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_id()` instead."] + pub fn id(&mut self, val: &str) -> &mut Self { + self.set_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_start_in()` instead."] + pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_start_in(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_types()` instead."] + pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_types(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_multiple()` instead."] pub fn multiple(&mut self, val: bool) -> &mut Self { - self.multiple_shim(val); + self.set_multiple(val); self } } diff --git a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs index 326eedf30c9..442c35d3a4a 100644 --- a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs +++ b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] pub type OpenWindowEventDetail; + #[doc = "Get the `features` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[wasm_bindgen(method, getter = "features")] + pub fn get_features(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `features` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "features")] - fn features_shim(this: &OpenWindowEventDetail, val: &str); + pub fn set_features(this: &OpenWindowEventDetail, val: &str); #[cfg(feature = "Node")] + #[doc = "Get the `frameElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] + #[wasm_bindgen(method, getter = "frameElement")] + pub fn get_frame_element(this: &OpenWindowEventDetail) -> Option; + #[cfg(feature = "Node")] + #[doc = "Change the `frameElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "frameElement")] - fn frame_element_shim(this: &OpenWindowEventDetail, val: Option<&Node>); + pub fn set_frame_element(this: &OpenWindowEventDetail, val: Option<&Node>); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &OpenWindowEventDetail, val: &str); + pub fn set_name(this: &OpenWindowEventDetail, val: &str); + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &OpenWindowEventDetail) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &OpenWindowEventDetail, val: &str); + pub fn set_url(this: &OpenWindowEventDetail, val: &str); } impl OpenWindowEventDetail { #[doc = "Construct a new `OpenWindowEventDetail`."] @@ -29,33 +62,25 @@ impl OpenWindowEventDetail { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `features` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_features()` instead."] pub fn features(&mut self, val: &str) -> &mut Self { - self.features_shim(val); + self.set_features(val); self } #[cfg(feature = "Node")] - #[doc = "Change the `frameElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_frame_element()` instead."] pub fn frame_element(&mut self, val: Option<&Node>) -> &mut Self { - self.frame_element_shim(val); + self.set_frame_element(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } } diff --git a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs index a55b56f6bb6..195e6e3e2a5 100644 --- a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs +++ b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs @@ -10,24 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub type OptionalEffectTiming; + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &OptionalEffectTiming, val: f64); + pub fn set_delay(this: &OptionalEffectTiming, val: f64); #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &OptionalEffectTiming) -> Option; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &OptionalEffectTiming, val: PlaybackDirection); + pub fn set_direction(this: &OptionalEffectTiming, val: PlaybackDirection); + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &OptionalEffectTiming) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); + pub fn set_duration(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "easing")] + pub fn get_easing(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &OptionalEffectTiming, val: &str); + pub fn set_easing(this: &OptionalEffectTiming, val: &str); + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "endDelay")] + pub fn get_end_delay(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &OptionalEffectTiming, val: f64); + pub fn set_end_delay(this: &OptionalEffectTiming, val: f64); + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &OptionalEffectTiming) -> Option; #[cfg(feature = "FillMode")] + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &OptionalEffectTiming, val: FillMode); + pub fn set_fill(this: &OptionalEffectTiming, val: FillMode); + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "iterationStart")] + pub fn get_iteration_start(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &OptionalEffectTiming, val: f64); + pub fn set_iteration_start(this: &OptionalEffectTiming, val: f64); + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &OptionalEffectTiming) -> Option; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &OptionalEffectTiming, val: f64); + pub fn set_iterations(this: &OptionalEffectTiming, val: f64); } impl OptionalEffectTiming { #[doc = "Construct a new `OptionalEffectTiming`."] @@ -38,62 +104,46 @@ impl OptionalEffectTiming { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay(val); self } #[cfg(feature = "PlaybackDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `easing` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_easing()` instead."] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing(val); self } - #[doc = "Change the `endDelay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_end_delay()` instead."] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay(val); self } #[cfg(feature = "FillMode")] - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill(val); self } - #[doc = "Change the `iterationStart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_iteration_start()` instead."] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations(val); self } } diff --git a/crates/web-sys/src/features/gen_OscillatorOptions.rs b/crates/web-sys/src/features/gen_OscillatorOptions.rs index 52a53e00595..32f4507e5fd 100644 --- a/crates/web-sys/src/features/gen_OscillatorOptions.rs +++ b/crates/web-sys/src/features/gen_OscillatorOptions.rs @@ -10,24 +10,84 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] pub type OscillatorOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &OscillatorOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &OscillatorOptions, val: u32); + pub fn set_channel_count(this: &OscillatorOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &OscillatorOptions) -> Option; #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &OscillatorOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &OscillatorOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &OscillatorOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &OscillatorOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &OscillatorOptions, val: ChannelInterpretation); + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[wasm_bindgen(method, getter = "detune")] + pub fn get_detune(this: &OscillatorOptions) -> Option; + #[doc = "Change the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &OscillatorOptions, val: f32); + pub fn set_detune(this: &OscillatorOptions, val: f32); + #[doc = "Get the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[wasm_bindgen(method, getter = "frequency")] + pub fn get_frequency(this: &OscillatorOptions) -> Option; + #[doc = "Change the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] #[wasm_bindgen(method, setter = "frequency")] - fn frequency_shim(this: &OscillatorOptions, val: f32); + pub fn set_frequency(this: &OscillatorOptions, val: f32); + #[cfg(feature = "PeriodicWave")] + #[doc = "Get the `periodicWave` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] + #[wasm_bindgen(method, getter = "periodicWave")] + pub fn get_periodic_wave(this: &OscillatorOptions) -> Option; #[cfg(feature = "PeriodicWave")] + #[doc = "Change the `periodicWave` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] #[wasm_bindgen(method, setter = "periodicWave")] - fn periodic_wave_shim(this: &OscillatorOptions, val: &PeriodicWave); + pub fn set_periodic_wave(this: &OscillatorOptions, val: &PeriodicWave); + #[cfg(feature = "OscillatorType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &OscillatorOptions) -> Option; #[cfg(feature = "OscillatorType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &OscillatorOptions, val: OscillatorType); + pub fn set_type(this: &OscillatorOptions, val: OscillatorType); } impl OscillatorOptions { #[doc = "Construct a new `OscillatorOptions`."] @@ -38,57 +98,43 @@ impl OscillatorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `detune` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_detune()` instead."] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune(val); self } - #[doc = "Change the `frequency` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + #[deprecated = "Use `set_frequency()` instead."] pub fn frequency(&mut self, val: f32) -> &mut Self { - self.frequency_shim(val); + self.set_frequency(val); self } #[cfg(feature = "PeriodicWave")] - #[doc = "Change the `periodicWave` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] + #[deprecated = "Use `set_periodic_wave()` instead."] pub fn periodic_wave(&mut self, val: &PeriodicWave) -> &mut Self { - self.periodic_wave_shim(val); + self.set_periodic_wave(val); self } #[cfg(feature = "OscillatorType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: OscillatorType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs index 3474f5bcb49..28e3cbeba68 100644 --- a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub type PageTransitionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PageTransitionEventInit, val: bool); + pub fn set_bubbles(this: &PageTransitionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PageTransitionEventInit, val: bool); + pub fn set_cancelable(this: &PageTransitionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PageTransitionEventInit, val: bool); + pub fn set_composed(this: &PageTransitionEventInit, val: bool); + #[doc = "Get the `inFrameSwap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[wasm_bindgen(method, getter = "inFrameSwap")] + pub fn get_in_frame_swap(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `inFrameSwap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "inFrameSwap")] - fn in_frame_swap_shim(this: &PageTransitionEventInit, val: bool); + pub fn set_in_frame_swap(this: &PageTransitionEventInit, val: bool); + #[doc = "Get the `persisted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[wasm_bindgen(method, getter = "persisted")] + pub fn get_persisted(this: &PageTransitionEventInit) -> Option; + #[doc = "Change the `persisted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] #[wasm_bindgen(method, setter = "persisted")] - fn persisted_shim(this: &PageTransitionEventInit, val: bool); + pub fn set_persisted(this: &PageTransitionEventInit, val: bool); } impl PageTransitionEventInit { #[doc = "Construct a new `PageTransitionEventInit`."] @@ -30,39 +70,29 @@ impl PageTransitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `inFrameSwap` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_in_frame_swap()` instead."] pub fn in_frame_swap(&mut self, val: bool) -> &mut Self { - self.in_frame_swap_shim(val); + self.set_in_frame_swap(val); self } - #[doc = "Change the `persisted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + #[deprecated = "Use `set_persisted()` instead."] pub fn persisted(&mut self, val: bool) -> &mut Self { - self.persisted_shim(val); + self.set_persisted(val); self } } diff --git a/crates/web-sys/src/features/gen_PannerOptions.rs b/crates/web-sys/src/features/gen_PannerOptions.rs index 357ea977eb0..2447947c572 100644 --- a/crates/web-sys/src/features/gen_PannerOptions.rs +++ b/crates/web-sys/src/features/gen_PannerOptions.rs @@ -10,44 +10,184 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub type PannerOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &PannerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &PannerOptions, val: u32); + pub fn set_channel_count(this: &PannerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &PannerOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &PannerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &PannerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &PannerOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &PannerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &PannerOptions, val: ChannelInterpretation); + #[doc = "Get the `coneInnerAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "coneInnerAngle")] + pub fn get_cone_inner_angle(this: &PannerOptions) -> Option; + #[doc = "Change the `coneInnerAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneInnerAngle")] - fn cone_inner_angle_shim(this: &PannerOptions, val: f64); + pub fn set_cone_inner_angle(this: &PannerOptions, val: f64); + #[doc = "Get the `coneOuterAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "coneOuterAngle")] + pub fn get_cone_outer_angle(this: &PannerOptions) -> Option; + #[doc = "Change the `coneOuterAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneOuterAngle")] - fn cone_outer_angle_shim(this: &PannerOptions, val: f64); + pub fn set_cone_outer_angle(this: &PannerOptions, val: f64); + #[doc = "Get the `coneOuterGain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "coneOuterGain")] + pub fn get_cone_outer_gain(this: &PannerOptions) -> Option; + #[doc = "Change the `coneOuterGain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "coneOuterGain")] - fn cone_outer_gain_shim(this: &PannerOptions, val: f64); + pub fn set_cone_outer_gain(this: &PannerOptions, val: f64); + #[cfg(feature = "DistanceModelType")] + #[doc = "Get the `distanceModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] + #[wasm_bindgen(method, getter = "distanceModel")] + pub fn get_distance_model(this: &PannerOptions) -> Option; #[cfg(feature = "DistanceModelType")] + #[doc = "Change the `distanceModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] #[wasm_bindgen(method, setter = "distanceModel")] - fn distance_model_shim(this: &PannerOptions, val: DistanceModelType); + pub fn set_distance_model(this: &PannerOptions, val: DistanceModelType); + #[doc = "Get the `maxDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "maxDistance")] + pub fn get_max_distance(this: &PannerOptions) -> Option; + #[doc = "Change the `maxDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "maxDistance")] - fn max_distance_shim(this: &PannerOptions, val: f64); + pub fn set_max_distance(this: &PannerOptions, val: f64); + #[doc = "Get the `orientationX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "orientationX")] + pub fn get_orientation_x(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationX")] - fn orientation_x_shim(this: &PannerOptions, val: f32); + pub fn set_orientation_x(this: &PannerOptions, val: f32); + #[doc = "Get the `orientationY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "orientationY")] + pub fn get_orientation_y(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationY")] - fn orientation_y_shim(this: &PannerOptions, val: f32); + pub fn set_orientation_y(this: &PannerOptions, val: f32); + #[doc = "Get the `orientationZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "orientationZ")] + pub fn get_orientation_z(this: &PannerOptions) -> Option; + #[doc = "Change the `orientationZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "orientationZ")] - fn orientation_z_shim(this: &PannerOptions, val: f32); + pub fn set_orientation_z(this: &PannerOptions, val: f32); #[cfg(feature = "PanningModelType")] + #[doc = "Get the `panningModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] + #[wasm_bindgen(method, getter = "panningModel")] + pub fn get_panning_model(this: &PannerOptions) -> Option; + #[cfg(feature = "PanningModelType")] + #[doc = "Change the `panningModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] #[wasm_bindgen(method, setter = "panningModel")] - fn panning_model_shim(this: &PannerOptions, val: PanningModelType); + pub fn set_panning_model(this: &PannerOptions, val: PanningModelType); + #[doc = "Get the `positionX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "positionX")] + pub fn get_position_x(this: &PannerOptions) -> Option; + #[doc = "Change the `positionX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionX")] - fn position_x_shim(this: &PannerOptions, val: f32); + pub fn set_position_x(this: &PannerOptions, val: f32); + #[doc = "Get the `positionY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "positionY")] + pub fn get_position_y(this: &PannerOptions) -> Option; + #[doc = "Change the `positionY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionY")] - fn position_y_shim(this: &PannerOptions, val: f32); + pub fn set_position_y(this: &PannerOptions, val: f32); + #[doc = "Get the `positionZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "positionZ")] + pub fn get_position_z(this: &PannerOptions) -> Option; + #[doc = "Change the `positionZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "positionZ")] - fn position_z_shim(this: &PannerOptions, val: f32); + pub fn set_position_z(this: &PannerOptions, val: f32); + #[doc = "Get the `refDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "refDistance")] + pub fn get_ref_distance(this: &PannerOptions) -> Option; + #[doc = "Change the `refDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "refDistance")] - fn ref_distance_shim(this: &PannerOptions, val: f64); + pub fn set_ref_distance(this: &PannerOptions, val: f64); + #[doc = "Get the `rolloffFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[wasm_bindgen(method, getter = "rolloffFactor")] + pub fn get_rolloff_factor(this: &PannerOptions) -> Option; + #[doc = "Change the `rolloffFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] #[wasm_bindgen(method, setter = "rolloffFactor")] - fn rolloff_factor_shim(this: &PannerOptions, val: f64); + pub fn set_rolloff_factor(this: &PannerOptions, val: f64); } impl PannerOptions { #[doc = "Construct a new `PannerOptions`."] @@ -58,127 +198,93 @@ impl PannerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `coneInnerAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_inner_angle()` instead."] pub fn cone_inner_angle(&mut self, val: f64) -> &mut Self { - self.cone_inner_angle_shim(val); + self.set_cone_inner_angle(val); self } - #[doc = "Change the `coneOuterAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_outer_angle()` instead."] pub fn cone_outer_angle(&mut self, val: f64) -> &mut Self { - self.cone_outer_angle_shim(val); + self.set_cone_outer_angle(val); self } - #[doc = "Change the `coneOuterGain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_cone_outer_gain()` instead."] pub fn cone_outer_gain(&mut self, val: f64) -> &mut Self { - self.cone_outer_gain_shim(val); + self.set_cone_outer_gain(val); self } #[cfg(feature = "DistanceModelType")] - #[doc = "Change the `distanceModel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] + #[deprecated = "Use `set_distance_model()` instead."] pub fn distance_model(&mut self, val: DistanceModelType) -> &mut Self { - self.distance_model_shim(val); + self.set_distance_model(val); self } - #[doc = "Change the `maxDistance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_max_distance()` instead."] pub fn max_distance(&mut self, val: f64) -> &mut Self { - self.max_distance_shim(val); + self.set_max_distance(val); self } - #[doc = "Change the `orientationX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_x()` instead."] pub fn orientation_x(&mut self, val: f32) -> &mut Self { - self.orientation_x_shim(val); + self.set_orientation_x(val); self } - #[doc = "Change the `orientationY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_y()` instead."] pub fn orientation_y(&mut self, val: f32) -> &mut Self { - self.orientation_y_shim(val); + self.set_orientation_y(val); self } - #[doc = "Change the `orientationZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_orientation_z()` instead."] pub fn orientation_z(&mut self, val: f32) -> &mut Self { - self.orientation_z_shim(val); + self.set_orientation_z(val); self } #[cfg(feature = "PanningModelType")] - #[doc = "Change the `panningModel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] + #[deprecated = "Use `set_panning_model()` instead."] pub fn panning_model(&mut self, val: PanningModelType) -> &mut Self { - self.panning_model_shim(val); + self.set_panning_model(val); self } - #[doc = "Change the `positionX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_x()` instead."] pub fn position_x(&mut self, val: f32) -> &mut Self { - self.position_x_shim(val); + self.set_position_x(val); self } - #[doc = "Change the `positionY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_y()` instead."] pub fn position_y(&mut self, val: f32) -> &mut Self { - self.position_y_shim(val); + self.set_position_y(val); self } - #[doc = "Change the `positionZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_position_z()` instead."] pub fn position_z(&mut self, val: f32) -> &mut Self { - self.position_z_shim(val); + self.set_position_z(val); self } - #[doc = "Change the `refDistance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_ref_distance()` instead."] pub fn ref_distance(&mut self, val: f64) -> &mut Self { - self.ref_distance_shim(val); + self.set_ref_distance(val); self } - #[doc = "Change the `rolloffFactor` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + #[deprecated = "Use `set_rolloff_factor()` instead."] pub fn rolloff_factor(&mut self, val: f64) -> &mut Self { - self.rolloff_factor_shim(val); + self.set_rolloff_factor(val); self } } diff --git a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs index 91144f4a6e6..704c8b3e6de 100644 --- a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub type PaymentMethodChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_bubbles(this: &PaymentMethodChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_cancelable(this: &PaymentMethodChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PaymentMethodChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PaymentMethodChangeEventInit, val: bool); + pub fn set_composed(this: &PaymentMethodChangeEventInit, val: bool); + #[doc = "Get the `methodDetails` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[wasm_bindgen(method, getter = "methodDetails")] + pub fn get_method_details(this: &PaymentMethodChangeEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `methodDetails` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodDetails")] - fn method_details_shim(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); + pub fn set_method_details(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); + #[doc = "Get the `methodName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[wasm_bindgen(method, getter = "methodName")] + pub fn get_method_name(this: &PaymentMethodChangeEventInit) -> String; + #[doc = "Change the `methodName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] #[wasm_bindgen(method, setter = "methodName")] - fn method_name_shim(this: &PaymentMethodChangeEventInit, val: &str); + pub fn set_method_name(this: &PaymentMethodChangeEventInit, val: &str); } impl PaymentMethodChangeEventInit { #[doc = "Construct a new `PaymentMethodChangeEventInit`."] @@ -31,39 +71,29 @@ impl PaymentMethodChangeEventInit { ret.method_name(method_name); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `methodDetails` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_method_details()` instead."] pub fn method_details(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.method_details_shim(val); + self.set_method_details(val); self } - #[doc = "Change the `methodName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + #[deprecated = "Use `set_method_name()` instead."] pub fn method_name(&mut self, val: &str) -> &mut Self { - self.method_name_shim(val); + self.set_method_name(val); self } } diff --git a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs index 0b096480b99..1ee2b715532 100644 --- a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] pub type PaymentRequestUpdateEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_bubbles(this: &PaymentRequestUpdateEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_cancelable(this: &PaymentRequestUpdateEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PaymentRequestUpdateEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PaymentRequestUpdateEventInit, val: bool); + pub fn set_composed(this: &PaymentRequestUpdateEventInit, val: bool); } impl PaymentRequestUpdateEventInit { #[doc = "Construct a new `PaymentRequestUpdateEventInit`."] @@ -26,25 +50,19 @@ impl PaymentRequestUpdateEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } } diff --git a/crates/web-sys/src/features/gen_Pbkdf2Params.rs b/crates/web-sys/src/features/gen_Pbkdf2Params.rs index 744c157c142..63318841580 100644 --- a/crates/web-sys/src/features/gen_Pbkdf2Params.rs +++ b/crates/web-sys/src/features/gen_Pbkdf2Params.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub type Pbkdf2Params; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &Pbkdf2Params) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &Pbkdf2Params, val: &str); + pub fn set_name(this: &Pbkdf2Params, val: &str); + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &Pbkdf2Params) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[wasm_bindgen(method, getter = "iterations")] + pub fn get_iterations(this: &Pbkdf2Params) -> u32; + #[doc = "Change the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &Pbkdf2Params, val: u32); + pub fn set_iterations(this: &Pbkdf2Params, val: u32); + #[doc = "Get the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[wasm_bindgen(method, getter = "salt")] + pub fn get_salt(this: &Pbkdf2Params) -> ::js_sys::Object; + #[doc = "Change the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] #[wasm_bindgen(method, setter = "salt")] - fn salt_shim(this: &Pbkdf2Params, val: &::js_sys::Object); + pub fn set_salt(this: &Pbkdf2Params, val: &::js_sys::Object); } impl Pbkdf2Params { #[doc = "Construct a new `Pbkdf2Params`."] @@ -37,32 +69,24 @@ impl Pbkdf2Params { ret.salt(salt); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } - #[doc = "Change the `iterations` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_iterations()` instead."] pub fn iterations(&mut self, val: u32) -> &mut Self { - self.iterations_shim(val); + self.set_iterations(val); self } - #[doc = "Change the `salt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + #[deprecated = "Use `set_salt()` instead."] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { - self.salt_shim(val); + self.set_salt(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs index b83c1ba16a4..a8c4e2a9e28 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs @@ -10,24 +10,96 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub type PerformanceEntryEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PerformanceEntryEventInit, val: bool); + pub fn set_bubbles(this: &PerformanceEntryEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PerformanceEntryEventInit, val: bool); + pub fn set_cancelable(this: &PerformanceEntryEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PerformanceEntryEventInit, val: bool); + pub fn set_composed(this: &PerformanceEntryEventInit, val: bool); + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &PerformanceEntryEventInit, val: f64); + pub fn set_duration(this: &PerformanceEntryEventInit, val: f64); + #[doc = "Get the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "entryType")] + pub fn get_entry_type(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "entryType")] - fn entry_type_shim(this: &PerformanceEntryEventInit, val: &str); + pub fn set_entry_type(this: &PerformanceEntryEventInit, val: &str); + #[doc = "Get the `epoch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "epoch")] + pub fn get_epoch(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `epoch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "epoch")] - fn epoch_shim(this: &PerformanceEntryEventInit, val: f64); + pub fn set_epoch(this: &PerformanceEntryEventInit, val: f64); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PerformanceEntryEventInit, val: &str); + pub fn set_name(this: &PerformanceEntryEventInit, val: &str); + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &PerformanceEntryEventInit, val: &str); + pub fn set_origin(this: &PerformanceEntryEventInit, val: &str); + #[doc = "Get the `startTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[wasm_bindgen(method, getter = "startTime")] + pub fn get_start_time(this: &PerformanceEntryEventInit) -> Option; + #[doc = "Change the `startTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] #[wasm_bindgen(method, setter = "startTime")] - fn start_time_shim(this: &PerformanceEntryEventInit, val: f64); + pub fn set_start_time(this: &PerformanceEntryEventInit, val: f64); } impl PerformanceEntryEventInit { #[doc = "Construct a new `PerformanceEntryEventInit`."] @@ -38,67 +110,49 @@ impl PerformanceEntryEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `duration` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_duration()` instead."] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration(val); self } - #[doc = "Change the `entryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_entry_type()` instead."] pub fn entry_type(&mut self, val: &str) -> &mut Self { - self.entry_type_shim(val); + self.set_entry_type(val); self } - #[doc = "Change the `epoch` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_epoch()` instead."] pub fn epoch(&mut self, val: f64) -> &mut Self { - self.epoch_shim(val); + self.set_epoch(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `startTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + #[deprecated = "Use `set_start_time()` instead."] pub fn start_time(&mut self, val: f64) -> &mut Self { - self.start_time_shim(val); + self.set_start_time(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs index f126babe13d..9300c84489a 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] pub type PerformanceEntryFilterOptions; + #[doc = "Get the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[wasm_bindgen(method, getter = "entryType")] + pub fn get_entry_type(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "entryType")] - fn entry_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_entry_type(this: &PerformanceEntryFilterOptions, val: &str); + #[doc = "Get the `initiatorType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[wasm_bindgen(method, getter = "initiatorType")] + pub fn get_initiator_type(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `initiatorType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "initiatorType")] - fn initiator_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_initiator_type(this: &PerformanceEntryFilterOptions, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PerformanceEntryFilterOptions) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PerformanceEntryFilterOptions, val: &str); + pub fn set_name(this: &PerformanceEntryFilterOptions, val: &str); } impl PerformanceEntryFilterOptions { #[doc = "Construct a new `PerformanceEntryFilterOptions`."] @@ -26,25 +50,19 @@ impl PerformanceEntryFilterOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `entryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_entry_type()` instead."] pub fn entry_type(&mut self, val: &str) -> &mut Self { - self.entry_type_shim(val); + self.set_entry_type(val); self } - #[doc = "Change the `initiatorType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_initiator_type()` instead."] pub fn initiator_type(&mut self, val: &str) -> &mut Self { - self.initiator_type_shim(val); + self.set_initiator_type(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs index d7ab2ac72b8..5a09e11a391 100644 --- a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] pub type PerformanceObserverInit; + #[doc = "Get the `buffered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[wasm_bindgen(method, getter = "buffered")] + pub fn get_buffered(this: &PerformanceObserverInit) -> Option; + #[doc = "Change the `buffered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, setter = "buffered")] - fn buffered_shim(this: &PerformanceObserverInit, val: bool); + pub fn set_buffered(this: &PerformanceObserverInit, val: bool); + #[doc = "Get the `entryTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[wasm_bindgen(method, getter = "entryTypes")] + pub fn get_entry_types(this: &PerformanceObserverInit) -> ::js_sys::Array; + #[doc = "Change the `entryTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] #[wasm_bindgen(method, setter = "entryTypes")] - fn entry_types_shim(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); + pub fn set_entry_types(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); } impl PerformanceObserverInit { #[doc = "Construct a new `PerformanceObserverInit`."] @@ -25,18 +41,14 @@ impl PerformanceObserverInit { ret.entry_types(entry_types); ret } - #[doc = "Change the `buffered` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[deprecated = "Use `set_buffered()` instead."] pub fn buffered(&mut self, val: bool) -> &mut Self { - self.buffered_shim(val); + self.set_buffered(val); self } - #[doc = "Change the `entryTypes` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + #[deprecated = "Use `set_entry_types()` instead."] pub fn entry_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entry_types_shim(val); + self.set_entry_types(val); self } } diff --git a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs index 66005726781..d861b30c138 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] pub type PeriodicWaveConstraints; + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] + #[wasm_bindgen(method, getter = "disableNormalization")] + pub fn get_disable_normalization(this: &PeriodicWaveConstraints) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &PeriodicWaveConstraints, val: bool); + pub fn set_disable_normalization(this: &PeriodicWaveConstraints, val: bool); } impl PeriodicWaveConstraints { #[doc = "Construct a new `PeriodicWaveConstraints`."] @@ -22,11 +30,9 @@ impl PeriodicWaveConstraints { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization(val); self } } diff --git a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs index 60a33a1061d..d2adf3247e4 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] pub type PeriodicWaveOptions; + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[wasm_bindgen(method, getter = "disableNormalization")] + pub fn get_disable_normalization(this: &PeriodicWaveOptions) -> Option; + #[doc = "Change the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &PeriodicWaveOptions, val: bool); + pub fn set_disable_normalization(this: &PeriodicWaveOptions, val: bool); + #[doc = "Get the `imag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[wasm_bindgen(method, getter = "imag")] + pub fn get_imag(this: &PeriodicWaveOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `imag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "imag")] - fn imag_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + pub fn set_imag(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `real` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[wasm_bindgen(method, getter = "real")] + pub fn get_real(this: &PeriodicWaveOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `real` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] #[wasm_bindgen(method, setter = "real")] - fn real_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + pub fn set_real(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); } impl PeriodicWaveOptions { #[doc = "Construct a new `PeriodicWaveOptions`."] @@ -26,25 +50,19 @@ impl PeriodicWaveOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `disableNormalization` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_disable_normalization()` instead."] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization(val); self } - #[doc = "Change the `imag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_imag()` instead."] pub fn imag(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.imag_shim(val); + self.set_imag(val); self } - #[doc = "Change the `real` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + #[deprecated = "Use `set_real()` instead."] pub fn real(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.real_shim(val); + self.set_real(val); self } } diff --git a/crates/web-sys/src/features/gen_PermissionDescriptor.rs b/crates/web-sys/src/features/gen_PermissionDescriptor.rs index 5d5777773f3..23005e4591f 100644 --- a/crates/web-sys/src/features/gen_PermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_PermissionDescriptor.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`*"] pub type PermissionDescriptor; #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PermissionDescriptor, val: PermissionName); + pub fn set_name(this: &PermissionDescriptor, val: PermissionName); } impl PermissionDescriptor { #[cfg(feature = "PermissionName")] @@ -26,11 +35,9 @@ impl PermissionDescriptor { ret } #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_PlaneLayout.rs b/crates/web-sys/src/features/gen_PlaneLayout.rs index d5859a0db5a..5b6df33cc86 100644 --- a/crates/web-sys/src/features/gen_PlaneLayout.rs +++ b/crates/web-sys/src/features/gen_PlaneLayout.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type PlaneLayout; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "offset")] + pub fn get_offset(this: &PlaneLayout) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &PlaneLayout, val: u32); + pub fn set_offset(this: &PlaneLayout, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stride")] + pub fn get_stride(this: &PlaneLayout) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `stride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "stride")] - fn stride_shim(this: &PlaneLayout, val: u32); + pub fn set_stride(this: &PlaneLayout, val: u32); } #[cfg(web_sys_unstable_apis)] impl PlaneLayout { @@ -35,25 +67,15 @@ impl PlaneLayout { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `offset` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_offset()` instead."] pub fn offset(&mut self, val: u32) -> &mut Self { - self.offset_shim(val); + self.set_offset(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `stride` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stride()` instead."] pub fn stride(&mut self, val: u32) -> &mut Self { - self.stride_shim(val); + self.set_stride(val); self } } diff --git a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs index 4a1f9c3f77d..ec2914c4923 100644 --- a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs +++ b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs @@ -10,26 +10,106 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub type PluginCrashedEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PluginCrashedEventInit, val: bool); + pub fn set_bubbles(this: &PluginCrashedEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PluginCrashedEventInit, val: bool); + pub fn set_cancelable(this: &PluginCrashedEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PluginCrashedEventInit, val: bool); + pub fn set_composed(this: &PluginCrashedEventInit, val: bool); + #[doc = "Get the `browserDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "browserDumpID")] + pub fn get_browser_dump_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `browserDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "browserDumpID")] - fn browser_dump_id_shim(this: &PluginCrashedEventInit, val: Option<&str>); + pub fn set_browser_dump_id(this: &PluginCrashedEventInit, val: Option<&str>); + #[doc = "Get the `gmpPlugin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "gmpPlugin")] + pub fn get_gmp_plugin(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `gmpPlugin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "gmpPlugin")] - fn gmp_plugin_shim(this: &PluginCrashedEventInit, val: bool); + pub fn set_gmp_plugin(this: &PluginCrashedEventInit, val: bool); + #[doc = "Get the `pluginDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "pluginDumpID")] + pub fn get_plugin_dump_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginDumpID")] - fn plugin_dump_id_shim(this: &PluginCrashedEventInit, val: &str); + pub fn set_plugin_dump_id(this: &PluginCrashedEventInit, val: &str); + #[doc = "Get the `pluginFilename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "pluginFilename")] + pub fn get_plugin_filename(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginFilename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginFilename")] - fn plugin_filename_shim(this: &PluginCrashedEventInit, val: Option<&str>); + pub fn set_plugin_filename(this: &PluginCrashedEventInit, val: Option<&str>); + #[doc = "Get the `pluginID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "pluginID")] + pub fn get_plugin_id(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginID")] - fn plugin_id_shim(this: &PluginCrashedEventInit, val: u32); + pub fn set_plugin_id(this: &PluginCrashedEventInit, val: u32); + #[doc = "Get the `pluginName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "pluginName")] + pub fn get_plugin_name(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `pluginName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "pluginName")] - fn plugin_name_shim(this: &PluginCrashedEventInit, val: &str); + pub fn set_plugin_name(this: &PluginCrashedEventInit, val: &str); + #[doc = "Get the `submittedCrashReport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[wasm_bindgen(method, getter = "submittedCrashReport")] + pub fn get_submitted_crash_report(this: &PluginCrashedEventInit) -> Option; + #[doc = "Change the `submittedCrashReport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] #[wasm_bindgen(method, setter = "submittedCrashReport")] - fn submitted_crash_report_shim(this: &PluginCrashedEventInit, val: bool); + pub fn set_submitted_crash_report(this: &PluginCrashedEventInit, val: bool); } impl PluginCrashedEventInit { #[doc = "Construct a new `PluginCrashedEventInit`."] @@ -40,74 +120,54 @@ impl PluginCrashedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `browserDumpID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_browser_dump_id()` instead."] pub fn browser_dump_id(&mut self, val: Option<&str>) -> &mut Self { - self.browser_dump_id_shim(val); + self.set_browser_dump_id(val); self } - #[doc = "Change the `gmpPlugin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_gmp_plugin()` instead."] pub fn gmp_plugin(&mut self, val: bool) -> &mut Self { - self.gmp_plugin_shim(val); + self.set_gmp_plugin(val); self } - #[doc = "Change the `pluginDumpID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_dump_id()` instead."] pub fn plugin_dump_id(&mut self, val: &str) -> &mut Self { - self.plugin_dump_id_shim(val); + self.set_plugin_dump_id(val); self } - #[doc = "Change the `pluginFilename` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_filename()` instead."] pub fn plugin_filename(&mut self, val: Option<&str>) -> &mut Self { - self.plugin_filename_shim(val); + self.set_plugin_filename(val); self } - #[doc = "Change the `pluginID` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_id()` instead."] pub fn plugin_id(&mut self, val: u32) -> &mut Self { - self.plugin_id_shim(val); + self.set_plugin_id(val); self } - #[doc = "Change the `pluginName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_plugin_name()` instead."] pub fn plugin_name(&mut self, val: &str) -> &mut Self { - self.plugin_name_shim(val); + self.set_plugin_name(val); self } - #[doc = "Change the `submittedCrashReport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + #[deprecated = "Use `set_submitted_crash_report()` instead."] pub fn submitted_crash_report(&mut self, val: bool) -> &mut Self { - self.submitted_crash_report_shim(val); + self.set_submitted_crash_report(val); self } } diff --git a/crates/web-sys/src/features/gen_PointerEventInit.rs b/crates/web-sys/src/features/gen_PointerEventInit.rs index 33a30240346..c07ee4a26d4 100644 --- a/crates/web-sys/src/features/gen_PointerEventInit.rs +++ b/crates/web-sys/src/features/gen_PointerEventInit.rs @@ -10,84 +10,390 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub type PointerEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PointerEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PointerEventInit, val: bool); + pub fn set_bubbles(this: &PointerEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PointerEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PointerEventInit, val: bool); + pub fn set_cancelable(this: &PointerEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PointerEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PointerEventInit, val: bool); + pub fn set_composed(this: &PointerEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &PointerEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &PointerEventInit, val: i32); + pub fn set_detail(this: &PointerEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &PointerEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &PointerEventInit, val: Option<&Window>); + pub fn set_view(this: &PointerEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &PointerEventInit, val: bool); + pub fn set_alt_key(this: &PointerEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &PointerEventInit, val: bool); + pub fn set_ctrl_key(this: &PointerEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &PointerEventInit, val: bool); + pub fn set_meta_key(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_fn(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_num_lock(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_os(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_symbol(this: &PointerEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &PointerEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &PointerEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &PointerEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &PointerEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &PointerEventInit, val: bool); + pub fn set_shift_key(this: &PointerEventInit, val: bool); + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "button")] + pub fn get_button(this: &PointerEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &PointerEventInit, val: i16); + pub fn set_button(this: &PointerEventInit, val: i16); + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "buttons")] + pub fn get_buttons(this: &PointerEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &PointerEventInit, val: u16); + pub fn set_buttons(this: &PointerEventInit, val: u16); + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "clientX")] + pub fn get_client_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &PointerEventInit, val: i32); + pub fn set_client_x(this: &PointerEventInit, val: i32); + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "clientY")] + pub fn get_client_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &PointerEventInit, val: i32); + pub fn set_client_y(this: &PointerEventInit, val: i32); + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "movementX")] + pub fn get_movement_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &PointerEventInit, val: i32); + pub fn set_movement_x(this: &PointerEventInit, val: i32); + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "movementY")] + pub fn get_movement_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &PointerEventInit, val: i32); + pub fn set_movement_y(this: &PointerEventInit, val: i32); #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "relatedTarget")] + pub fn get_related_target(this: &PointerEventInit) -> Option; + #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &PointerEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &PointerEventInit, val: Option<&EventTarget>); + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "screenX")] + pub fn get_screen_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &PointerEventInit, val: i32); + pub fn set_screen_x(this: &PointerEventInit, val: i32); + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "screenY")] + pub fn get_screen_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &PointerEventInit, val: i32); + pub fn set_screen_y(this: &PointerEventInit, val: i32); + #[doc = "Get the `coalescedEvents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "coalescedEvents")] + pub fn get_coalesced_events(this: &PointerEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `coalescedEvents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "coalescedEvents")] - fn coalesced_events_shim(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_coalesced_events(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &PointerEventInit) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &PointerEventInit, val: i32); + pub fn set_height(this: &PointerEventInit, val: i32); + #[doc = "Get the `isPrimary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "isPrimary")] + pub fn get_is_primary(this: &PointerEventInit) -> Option; + #[doc = "Change the `isPrimary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "isPrimary")] - fn is_primary_shim(this: &PointerEventInit, val: bool); + pub fn set_is_primary(this: &PointerEventInit, val: bool); + #[doc = "Get the `pointerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "pointerId")] + pub fn get_pointer_id(this: &PointerEventInit) -> Option; + #[doc = "Change the `pointerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pointerId")] - fn pointer_id_shim(this: &PointerEventInit, val: i32); + pub fn set_pointer_id(this: &PointerEventInit, val: i32); + #[doc = "Get the `pointerType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "pointerType")] + pub fn get_pointer_type(this: &PointerEventInit) -> Option; + #[doc = "Change the `pointerType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pointerType")] - fn pointer_type_shim(this: &PointerEventInit, val: &str); + pub fn set_pointer_type(this: &PointerEventInit, val: &str); + #[doc = "Get the `pressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "pressure")] + pub fn get_pressure(this: &PointerEventInit) -> Option; + #[doc = "Change the `pressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "pressure")] - fn pressure_shim(this: &PointerEventInit, val: f32); + pub fn set_pressure(this: &PointerEventInit, val: f32); + #[doc = "Get the `tangentialPressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "tangentialPressure")] + pub fn get_tangential_pressure(this: &PointerEventInit) -> Option; + #[doc = "Change the `tangentialPressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tangentialPressure")] - fn tangential_pressure_shim(this: &PointerEventInit, val: f32); + pub fn set_tangential_pressure(this: &PointerEventInit, val: f32); + #[doc = "Get the `tiltX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "tiltX")] + pub fn get_tilt_x(this: &PointerEventInit) -> Option; + #[doc = "Change the `tiltX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tiltX")] - fn tilt_x_shim(this: &PointerEventInit, val: i32); + pub fn set_tilt_x(this: &PointerEventInit, val: i32); + #[doc = "Get the `tiltY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "tiltY")] + pub fn get_tilt_y(this: &PointerEventInit) -> Option; + #[doc = "Change the `tiltY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "tiltY")] - fn tilt_y_shim(this: &PointerEventInit, val: i32); + pub fn set_tilt_y(this: &PointerEventInit, val: i32); + #[doc = "Get the `twist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "twist")] + pub fn get_twist(this: &PointerEventInit) -> Option; + #[doc = "Change the `twist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "twist")] - fn twist_shim(this: &PointerEventInit, val: i32); + pub fn set_twist(this: &PointerEventInit, val: i32); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &PointerEventInit) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &PointerEventInit, val: i32); + pub fn set_width(this: &PointerEventInit, val: i32); } impl PointerEventInit { #[doc = "Construct a new `PointerEventInit`."] @@ -98,272 +404,196 @@ impl PointerEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y(val); self } - #[doc = "Change the `coalescedEvents` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_coalesced_events()` instead."] pub fn coalesced_events(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.coalesced_events_shim(val); + self.set_coalesced_events(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `isPrimary` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_is_primary()` instead."] pub fn is_primary(&mut self, val: bool) -> &mut Self { - self.is_primary_shim(val); + self.set_is_primary(val); self } - #[doc = "Change the `pointerId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pointer_id()` instead."] pub fn pointer_id(&mut self, val: i32) -> &mut Self { - self.pointer_id_shim(val); + self.set_pointer_id(val); self } - #[doc = "Change the `pointerType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pointer_type()` instead."] pub fn pointer_type(&mut self, val: &str) -> &mut Self { - self.pointer_type_shim(val); + self.set_pointer_type(val); self } - #[doc = "Change the `pressure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_pressure()` instead."] pub fn pressure(&mut self, val: f32) -> &mut Self { - self.pressure_shim(val); + self.set_pressure(val); self } - #[doc = "Change the `tangentialPressure` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tangential_pressure()` instead."] pub fn tangential_pressure(&mut self, val: f32) -> &mut Self { - self.tangential_pressure_shim(val); + self.set_tangential_pressure(val); self } - #[doc = "Change the `tiltX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tilt_x()` instead."] pub fn tilt_x(&mut self, val: i32) -> &mut Self { - self.tilt_x_shim(val); + self.set_tilt_x(val); self } - #[doc = "Change the `tiltY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_tilt_y()` instead."] pub fn tilt_y(&mut self, val: i32) -> &mut Self { - self.tilt_y_shim(val); + self.set_tilt_y(val); self } - #[doc = "Change the `twist` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_twist()` instead."] pub fn twist(&mut self, val: i32) -> &mut Self { - self.twist_shim(val); + self.set_twist(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_PopStateEventInit.rs b/crates/web-sys/src/features/gen_PopStateEventInit.rs index e00ea0f3eae..61178cc017e 100644 --- a/crates/web-sys/src/features/gen_PopStateEventInit.rs +++ b/crates/web-sys/src/features/gen_PopStateEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub type PopStateEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PopStateEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PopStateEventInit, val: bool); + pub fn set_bubbles(this: &PopStateEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PopStateEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PopStateEventInit, val: bool); + pub fn set_cancelable(this: &PopStateEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PopStateEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PopStateEventInit, val: bool); + pub fn set_composed(this: &PopStateEventInit, val: bool); + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[wasm_bindgen(method, getter = "state")] + pub fn get_state(this: &PopStateEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_state(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); } impl PopStateEventInit { #[doc = "Construct a new `PopStateEventInit`."] @@ -28,32 +60,24 @@ impl PopStateEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.state_shim(val); + self.set_state(val); self } } diff --git a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs index 3e1d3043190..94ae9d2c24d 100644 --- a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs +++ b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs @@ -10,19 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub type PopupBlockedEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PopupBlockedEventInit, val: bool); + pub fn set_bubbles(this: &PopupBlockedEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PopupBlockedEventInit, val: bool); + pub fn set_cancelable(this: &PopupBlockedEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PopupBlockedEventInit, val: bool); + pub fn set_composed(this: &PopupBlockedEventInit, val: bool); + #[doc = "Get the `popupWindowFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[wasm_bindgen(method, getter = "popupWindowFeatures")] + pub fn get_popup_window_features(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `popupWindowFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "popupWindowFeatures")] - fn popup_window_features_shim(this: &PopupBlockedEventInit, val: &str); + pub fn set_popup_window_features(this: &PopupBlockedEventInit, val: &str); + #[doc = "Get the `popupWindowName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[wasm_bindgen(method, getter = "popupWindowName")] + pub fn get_popup_window_name(this: &PopupBlockedEventInit) -> Option; + #[doc = "Change the `popupWindowName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] #[wasm_bindgen(method, setter = "popupWindowName")] - fn popup_window_name_shim(this: &PopupBlockedEventInit, val: &str); + pub fn set_popup_window_name(this: &PopupBlockedEventInit, val: &str); #[cfg(feature = "Window")] + #[doc = "Get the `requestingWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "requestingWindow")] + pub fn get_requesting_window(this: &PopupBlockedEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `requestingWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "requestingWindow")] - fn requesting_window_shim(this: &PopupBlockedEventInit, val: Option<&Window>); + pub fn set_requesting_window(this: &PopupBlockedEventInit, val: Option<&Window>); } impl PopupBlockedEventInit { #[doc = "Construct a new `PopupBlockedEventInit`."] @@ -33,47 +82,35 @@ impl PopupBlockedEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `popupWindowFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_popup_window_features()` instead."] pub fn popup_window_features(&mut self, val: &str) -> &mut Self { - self.popup_window_features_shim(val); + self.set_popup_window_features(val); self } - #[doc = "Change the `popupWindowName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + #[deprecated = "Use `set_popup_window_name()` instead."] pub fn popup_window_name(&mut self, val: &str) -> &mut Self { - self.popup_window_name_shim(val); + self.set_popup_window_name(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `requestingWindow` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] + #[deprecated = "Use `set_requesting_window()` instead."] pub fn requesting_window(&mut self, val: Option<&Window>) -> &mut Self { - self.requesting_window_shim(val); + self.set_requesting_window(val); self } } diff --git a/crates/web-sys/src/features/gen_PositionOptions.rs b/crates/web-sys/src/features/gen_PositionOptions.rs index 2d5d5276299..63806556d61 100644 --- a/crates/web-sys/src/features/gen_PositionOptions.rs +++ b/crates/web-sys/src/features/gen_PositionOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] pub type PositionOptions; + #[doc = "Get the `enableHighAccuracy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[wasm_bindgen(method, getter = "enableHighAccuracy")] + pub fn get_enable_high_accuracy(this: &PositionOptions) -> Option; + #[doc = "Change the `enableHighAccuracy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "enableHighAccuracy")] - fn enable_high_accuracy_shim(this: &PositionOptions, val: bool); + pub fn set_enable_high_accuracy(this: &PositionOptions, val: bool); + #[doc = "Get the `maximumAge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[wasm_bindgen(method, getter = "maximumAge")] + pub fn get_maximum_age(this: &PositionOptions) -> Option; + #[doc = "Change the `maximumAge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "maximumAge")] - fn maximum_age_shim(this: &PositionOptions, val: u32); + pub fn set_maximum_age(this: &PositionOptions, val: u32); + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[wasm_bindgen(method, getter = "timeout")] + pub fn get_timeout(this: &PositionOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PositionOptions, val: u32); + pub fn set_timeout(this: &PositionOptions, val: u32); } impl PositionOptions { #[doc = "Construct a new `PositionOptions`."] @@ -26,25 +50,19 @@ impl PositionOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `enableHighAccuracy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_enable_high_accuracy()` instead."] pub fn enable_high_accuracy(&mut self, val: bool) -> &mut Self { - self.enable_high_accuracy_shim(val); + self.set_enable_high_accuracy(val); self } - #[doc = "Change the `maximumAge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_maximum_age()` instead."] pub fn maximum_age(&mut self, val: u32) -> &mut Self { - self.maximum_age_shim(val); + self.set_maximum_age(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout(val); self } } diff --git a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs index 146db924710..22ef4de372d 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs @@ -10,15 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] pub type PresentationConnectionAvailableEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_bubbles(this: &PresentationConnectionAvailableEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_cancelable(this: &PresentationConnectionAvailableEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PresentationConnectionAvailableEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + pub fn set_composed(this: &PresentationConnectionAvailableEventInit, val: bool); + #[cfg(feature = "PresentationConnection")] + #[doc = "Get the `connection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] + #[wasm_bindgen(method, getter = "connection")] + pub fn get_connection( + this: &PresentationConnectionAvailableEventInit, + ) -> PresentationConnection; #[cfg(feature = "PresentationConnection")] + #[doc = "Change the `connection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] #[wasm_bindgen(method, setter = "connection")] - fn connection_shim( + pub fn set_connection( this: &PresentationConnectionAvailableEventInit, val: &PresentationConnection, ); @@ -34,33 +69,25 @@ impl PresentationConnectionAvailableEventInit { ret.connection(connection); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "PresentationConnection")] - #[doc = "Change the `connection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] + #[deprecated = "Use `set_connection()` instead."] pub fn connection(&mut self, val: &PresentationConnection) -> &mut Self { - self.connection_shim(val); + self.set_connection(val); self } } diff --git a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs index c7786dacd06..aef67635b74 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs @@ -10,17 +10,60 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub type PresentationConnectionCloseEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_bubbles(this: &PresentationConnectionCloseEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_cancelable(this: &PresentationConnectionCloseEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PresentationConnectionCloseEventInit, val: bool); + pub fn set_composed(this: &PresentationConnectionCloseEventInit, val: bool); + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[wasm_bindgen(method, getter = "message")] + pub fn get_message(this: &PresentationConnectionCloseEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &PresentationConnectionCloseEventInit, val: &str); + pub fn set_message(this: &PresentationConnectionCloseEventInit, val: &str); + #[cfg(feature = "PresentationConnectionClosedReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason( + this: &PresentationConnectionCloseEventInit, + ) -> PresentationConnectionClosedReason; #[cfg(feature = "PresentationConnectionClosedReason")] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim( + pub fn set_reason( this: &PresentationConnectionCloseEventInit, val: PresentationConnectionClosedReason, ); @@ -36,40 +79,30 @@ impl PresentationConnectionCloseEventInit { ret.reason(reason); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message(val); self } #[cfg(feature = "PresentationConnectionClosedReason")] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: PresentationConnectionClosedReason) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs index 7ab50ae8bb7..7dc5738b2d8 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub type ProfileTimelineLayerRect; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_height(this: &ProfileTimelineLayerRect, val: i32); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_width(this: &ProfileTimelineLayerRect, val: i32); + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[wasm_bindgen(method, getter = "x")] + pub fn get_x(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_x(this: &ProfileTimelineLayerRect, val: i32); + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[wasm_bindgen(method, getter = "y")] + pub fn get_y(this: &ProfileTimelineLayerRect) -> Option; + #[doc = "Change the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &ProfileTimelineLayerRect, val: i32); + pub fn set_y(this: &ProfileTimelineLayerRect, val: i32); } impl ProfileTimelineLayerRect { #[doc = "Construct a new `ProfileTimelineLayerRect`."] @@ -28,32 +60,24 @@ impl ProfileTimelineLayerRect { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } - #[doc = "Change the `x` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_x()` instead."] pub fn x(&mut self, val: i32) -> &mut Self { - self.x_shim(val); + self.set_x(val); self } - #[doc = "Change the `y` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + #[deprecated = "Use `set_y()` instead."] pub fn y(&mut self, val: i32) -> &mut Self { - self.y_shim(val); + self.set_y(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs index acd1885a31d..0aa2993c14a 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs @@ -10,41 +10,170 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub type ProfileTimelineMarker; + #[doc = "Get the `causeName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "causeName")] + pub fn get_cause_name(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `causeName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "causeName")] - fn cause_name_shim(this: &ProfileTimelineMarker, val: &str); + pub fn set_cause_name(this: &ProfileTimelineMarker, val: &str); + #[doc = "Get the `end` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "end")] + pub fn get_end(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `end` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "end")] - fn end_shim(this: &ProfileTimelineMarker, val: f64); + pub fn set_end(this: &ProfileTimelineMarker, val: f64); + #[doc = "Get the `endStack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "endStack")] + pub fn get_end_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; + #[doc = "Change the `endStack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "endStack")] - fn end_stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + pub fn set_end_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + #[doc = "Get the `eventPhase` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "eventPhase")] + pub fn get_event_phase(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `eventPhase` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "eventPhase")] - fn event_phase_shim(this: &ProfileTimelineMarker, val: u16); + pub fn set_event_phase(this: &ProfileTimelineMarker, val: u16); + #[doc = "Get the `isAnimationOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "isAnimationOnly")] + pub fn get_is_animation_only(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `isAnimationOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "isAnimationOnly")] - fn is_animation_only_shim(this: &ProfileTimelineMarker, val: bool); + pub fn set_is_animation_only(this: &ProfileTimelineMarker, val: bool); + #[doc = "Get the `isOffMainThread` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "isOffMainThread")] + pub fn get_is_off_main_thread(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `isOffMainThread` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "isOffMainThread")] - fn is_off_main_thread_shim(this: &ProfileTimelineMarker, val: bool); + pub fn set_is_off_main_thread(this: &ProfileTimelineMarker, val: bool); #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + #[doc = "Get the `messagePortOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] + #[wasm_bindgen(method, getter = "messagePortOperation")] + pub fn get_message_port_operation( + this: &ProfileTimelineMarker, + ) -> Option; + #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + #[doc = "Change the `messagePortOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] #[wasm_bindgen(method, setter = "messagePortOperation")] - fn message_port_operation_shim( + pub fn set_message_port_operation( this: &ProfileTimelineMarker, val: ProfileTimelineMessagePortOperationType, ); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ProfileTimelineMarker, val: &str); + pub fn set_name(this: &ProfileTimelineMarker, val: &str); + #[doc = "Get the `processType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "processType")] + pub fn get_process_type(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `processType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "processType")] - fn process_type_shim(this: &ProfileTimelineMarker, val: u16); + pub fn set_process_type(this: &ProfileTimelineMarker, val: u16); + #[doc = "Get the `rectangles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "rectangles")] + pub fn get_rectangles(this: &ProfileTimelineMarker) -> Option<::js_sys::Array>; + #[doc = "Change the `rectangles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "rectangles")] - fn rectangles_shim(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); + pub fn set_rectangles(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `stack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "stack")] + pub fn get_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; + #[doc = "Change the `stack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "stack")] - fn stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + pub fn set_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "start")] + pub fn get_start(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &ProfileTimelineMarker, val: f64); + pub fn set_start(this: &ProfileTimelineMarker, val: f64); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ProfileTimelineMarker, val: &str); + pub fn set_type(this: &ProfileTimelineMarker, val: &str); + #[doc = "Get the `unixTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[wasm_bindgen(method, getter = "unixTime")] + pub fn get_unix_time(this: &ProfileTimelineMarker) -> Option; + #[doc = "Change the `unixTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] #[wasm_bindgen(method, setter = "unixTime")] - fn unix_time_shim(this: &ProfileTimelineMarker, val: f64); + pub fn set_unix_time(this: &ProfileTimelineMarker, val: f64); + #[cfg(feature = "ProfileTimelineWorkerOperationType")] + #[doc = "Get the `workerOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] + #[wasm_bindgen(method, getter = "workerOperation")] + pub fn get_worker_operation( + this: &ProfileTimelineMarker, + ) -> Option; #[cfg(feature = "ProfileTimelineWorkerOperationType")] + #[doc = "Change the `workerOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] #[wasm_bindgen(method, setter = "workerOperation")] - fn worker_operation_shim(this: &ProfileTimelineMarker, val: ProfileTimelineWorkerOperationType); + pub fn set_worker_operation( + this: &ProfileTimelineMarker, + val: ProfileTimelineWorkerOperationType, + ); } impl ProfileTimelineMarker { #[doc = "Construct a new `ProfileTimelineMarker`."] @@ -55,114 +184,84 @@ impl ProfileTimelineMarker { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `causeName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_cause_name()` instead."] pub fn cause_name(&mut self, val: &str) -> &mut Self { - self.cause_name_shim(val); + self.set_cause_name(val); self } - #[doc = "Change the `end` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_end()` instead."] pub fn end(&mut self, val: f64) -> &mut Self { - self.end_shim(val); + self.set_end(val); self } - #[doc = "Change the `endStack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_end_stack()` instead."] pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.end_stack_shim(val); + self.set_end_stack(val); self } - #[doc = "Change the `eventPhase` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_event_phase()` instead."] pub fn event_phase(&mut self, val: u16) -> &mut Self { - self.event_phase_shim(val); + self.set_event_phase(val); self } - #[doc = "Change the `isAnimationOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_is_animation_only()` instead."] pub fn is_animation_only(&mut self, val: bool) -> &mut Self { - self.is_animation_only_shim(val); + self.set_is_animation_only(val); self } - #[doc = "Change the `isOffMainThread` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_is_off_main_thread()` instead."] pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self { - self.is_off_main_thread_shim(val); + self.set_is_off_main_thread(val); self } #[cfg(feature = "ProfileTimelineMessagePortOperationType")] - #[doc = "Change the `messagePortOperation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] + #[deprecated = "Use `set_message_port_operation()` instead."] pub fn message_port_operation( &mut self, val: ProfileTimelineMessagePortOperationType, ) -> &mut Self { - self.message_port_operation_shim(val); + self.set_message_port_operation(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `processType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_process_type()` instead."] pub fn process_type(&mut self, val: u16) -> &mut Self { - self.process_type_shim(val); + self.set_process_type(val); self } - #[doc = "Change the `rectangles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_rectangles()` instead."] pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.rectangles_shim(val); + self.set_rectangles(val); self } - #[doc = "Change the `stack` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_stack()` instead."] pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.stack_shim(val); + self.set_stack(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: f64) -> &mut Self { - self.start_shim(val); + self.set_start(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `unixTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + #[deprecated = "Use `set_unix_time()` instead."] pub fn unix_time(&mut self, val: f64) -> &mut Self { - self.unix_time_shim(val); + self.set_unix_time(val); self } #[cfg(feature = "ProfileTimelineWorkerOperationType")] - #[doc = "Change the `workerOperation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] + #[deprecated = "Use `set_worker_operation()` instead."] pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self { - self.worker_operation_shim(val); + self.set_worker_operation(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs index 33a4ac48f09..0c0181b6eee 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs @@ -10,20 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub type ProfileTimelineStackFrame; + #[doc = "Get the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "asyncCause")] + pub fn get_async_cause(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "asyncCause")] - fn async_cause_shim(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_async_cause(this: &ProfileTimelineStackFrame, val: &str); + #[doc = "Get the `asyncParent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "asyncParent")] + pub fn get_async_parent(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; + #[doc = "Change the `asyncParent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "asyncParent")] - fn async_parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + pub fn set_async_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + #[doc = "Get the `column` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "column")] + pub fn get_column(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `column` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "column")] - fn column_shim(this: &ProfileTimelineStackFrame, val: i32); + pub fn set_column(this: &ProfileTimelineStackFrame, val: i32); + #[doc = "Get the `functionDisplayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "functionDisplayName")] + pub fn get_function_display_name(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `functionDisplayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "functionDisplayName")] - fn function_display_name_shim(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_function_display_name(this: &ProfileTimelineStackFrame, val: &str); + #[doc = "Get the `line` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "line")] + pub fn get_line(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `line` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "line")] - fn line_shim(this: &ProfileTimelineStackFrame, val: i32); + pub fn set_line(this: &ProfileTimelineStackFrame, val: i32); + #[doc = "Get the `parent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "parent")] + pub fn get_parent(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; + #[doc = "Change the `parent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "parent")] - fn parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + pub fn set_parent(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &ProfileTimelineStackFrame) -> Option; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &ProfileTimelineStackFrame, val: &str); + pub fn set_source(this: &ProfileTimelineStackFrame, val: &str); } impl ProfileTimelineStackFrame { #[doc = "Construct a new `ProfileTimelineStackFrame`."] @@ -34,53 +90,39 @@ impl ProfileTimelineStackFrame { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `asyncCause` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_async_cause()` instead."] pub fn async_cause(&mut self, val: &str) -> &mut Self { - self.async_cause_shim(val); + self.set_async_cause(val); self } - #[doc = "Change the `asyncParent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_async_parent()` instead."] pub fn async_parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.async_parent_shim(val); + self.set_async_parent(val); self } - #[doc = "Change the `column` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_column()` instead."] pub fn column(&mut self, val: i32) -> &mut Self { - self.column_shim(val); + self.set_column(val); self } - #[doc = "Change the `functionDisplayName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_function_display_name()` instead."] pub fn function_display_name(&mut self, val: &str) -> &mut Self { - self.function_display_name_shim(val); + self.set_function_display_name(val); self } - #[doc = "Change the `line` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_line()` instead."] pub fn line(&mut self, val: i32) -> &mut Self { - self.line_shim(val); + self.set_line(val); self } - #[doc = "Change the `parent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_parent()` instead."] pub fn parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.parent_shim(val); + self.set_parent(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: &str) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_ProgressEventInit.rs b/crates/web-sys/src/features/gen_ProgressEventInit.rs index f638b1dcad2..97a1fed65f7 100644 --- a/crates/web-sys/src/features/gen_ProgressEventInit.rs +++ b/crates/web-sys/src/features/gen_ProgressEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub type ProgressEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ProgressEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ProgressEventInit, val: bool); + pub fn set_bubbles(this: &ProgressEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ProgressEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ProgressEventInit, val: bool); + pub fn set_cancelable(this: &ProgressEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ProgressEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ProgressEventInit, val: bool); + pub fn set_composed(this: &ProgressEventInit, val: bool); + #[doc = "Get the `lengthComputable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "lengthComputable")] + pub fn get_length_computable(this: &ProgressEventInit) -> Option; + #[doc = "Change the `lengthComputable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "lengthComputable")] - fn length_computable_shim(this: &ProgressEventInit, val: bool); + pub fn set_length_computable(this: &ProgressEventInit, val: bool); + #[doc = "Get the `loaded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "loaded")] + pub fn get_loaded(this: &ProgressEventInit) -> Option; + #[doc = "Change the `loaded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "loaded")] - fn loaded_shim(this: &ProgressEventInit, val: f64); + pub fn set_loaded(this: &ProgressEventInit, val: f64); + #[doc = "Get the `total` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[wasm_bindgen(method, getter = "total")] + pub fn get_total(this: &ProgressEventInit) -> Option; + #[doc = "Change the `total` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] #[wasm_bindgen(method, setter = "total")] - fn total_shim(this: &ProgressEventInit, val: f64); + pub fn set_total(this: &ProgressEventInit, val: f64); } impl ProgressEventInit { #[doc = "Construct a new `ProgressEventInit`."] @@ -32,46 +80,34 @@ impl ProgressEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `lengthComputable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_length_computable()` instead."] pub fn length_computable(&mut self, val: bool) -> &mut Self { - self.length_computable_shim(val); + self.set_length_computable(val); self } - #[doc = "Change the `loaded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_loaded()` instead."] pub fn loaded(&mut self, val: f64) -> &mut Self { - self.loaded_shim(val); + self.set_loaded(val); self } - #[doc = "Change the `total` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + #[deprecated = "Use `set_total()` instead."] pub fn total(&mut self, val: f64) -> &mut Self { - self.total_shim(val); + self.set_total(val); self } } diff --git a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs index 05effa91c6e..328fbe07318 100644 --- a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs +++ b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub type PromiseRejectionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PromiseRejectionEventInit, val: bool); + pub fn set_bubbles(this: &PromiseRejectionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PromiseRejectionEventInit, val: bool); + pub fn set_cancelable(this: &PromiseRejectionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PromiseRejectionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PromiseRejectionEventInit, val: bool); + pub fn set_composed(this: &PromiseRejectionEventInit, val: bool); + #[doc = "Get the `promise` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[wasm_bindgen(method, getter = "promise")] + pub fn get_promise(this: &PromiseRejectionEventInit) -> ::js_sys::Promise; + #[doc = "Change the `promise` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "promise")] - fn promise_shim(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); + pub fn set_promise(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &PromiseRejectionEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_reason(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); } impl PromiseRejectionEventInit { #[doc = "Construct a new `PromiseRejectionEventInit`."] @@ -31,39 +71,29 @@ impl PromiseRejectionEventInit { ret.promise(promise); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `promise` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_promise()` instead."] pub fn promise(&mut self, val: &::js_sys::Promise) -> &mut Self { - self.promise_shim(val); + self.set_promise(val); self } - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs index bbd042e3033..630f3e6547a 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs @@ -11,43 +11,128 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub type PublicKeyCredentialCreationOptions; #[cfg(feature = "AttestationConveyancePreference")] + #[doc = "Get the `attestation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "attestation")] + pub fn get_attestation( + this: &PublicKeyCredentialCreationOptions, + ) -> Option; + #[cfg(feature = "AttestationConveyancePreference")] + #[doc = "Change the `attestation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "attestation")] - fn attestation_shim( + pub fn set_attestation( this: &PublicKeyCredentialCreationOptions, val: AttestationConveyancePreference, ); #[cfg(feature = "AuthenticatorSelectionCriteria")] + #[doc = "Get the `authenticatorSelection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "authenticatorSelection")] + pub fn get_authenticator_selection( + this: &PublicKeyCredentialCreationOptions, + ) -> Option; + #[cfg(feature = "AuthenticatorSelectionCriteria")] + #[doc = "Change the `authenticatorSelection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "authenticatorSelection")] - fn authenticator_selection_shim( + pub fn set_authenticator_selection( this: &PublicKeyCredentialCreationOptions, val: &AuthenticatorSelectionCriteria, ); + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "challenge")] + pub fn get_challenge(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Object; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); + pub fn set_challenge(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); + #[doc = "Get the `excludeCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "excludeCredentials")] + pub fn get_exclude_credentials( + this: &PublicKeyCredentialCreationOptions, + ) -> Option<::js_sys::Array>; + #[doc = "Change the `excludeCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "excludeCredentials")] - fn exclude_credentials_shim( + pub fn set_exclude_credentials( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "extensions")] + pub fn get_extensions( + this: &PublicKeyCredentialCreationOptions, + ) -> Option; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "extensions")] - fn extensions_shim( + pub fn set_extensions( this: &PublicKeyCredentialCreationOptions, val: &AuthenticationExtensionsClientInputs, ); + #[doc = "Get the `pubKeyCredParams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "pubKeyCredParams")] + pub fn get_pub_key_cred_params(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Array; + #[doc = "Change the `pubKeyCredParams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "pubKeyCredParams")] - fn pub_key_cred_params_shim( + pub fn set_pub_key_cred_params( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); #[cfg(feature = "PublicKeyCredentialRpEntity")] + #[doc = "Get the `rp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] + #[wasm_bindgen(method, getter = "rp")] + pub fn get_rp(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialRpEntity; + #[cfg(feature = "PublicKeyCredentialRpEntity")] + #[doc = "Change the `rp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "rp")] - fn rp_shim(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); + pub fn set_rp(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[wasm_bindgen(method, getter = "timeout")] + pub fn get_timeout(this: &PublicKeyCredentialCreationOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PublicKeyCredentialCreationOptions, val: u32); + pub fn set_timeout(this: &PublicKeyCredentialCreationOptions, val: u32); + #[cfg(feature = "PublicKeyCredentialUserEntity")] + #[doc = "Get the `user` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] + #[wasm_bindgen(method, getter = "user")] + pub fn get_user(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialUserEntity; #[cfg(feature = "PublicKeyCredentialUserEntity")] + #[doc = "Change the `user` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "user")] - fn user_shim(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialUserEntity); + pub fn set_user(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialUserEntity); } impl PublicKeyCredentialCreationOptions { #[cfg(all( @@ -72,71 +157,53 @@ impl PublicKeyCredentialCreationOptions { ret } #[cfg(feature = "AttestationConveyancePreference")] - #[doc = "Change the `attestation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_attestation()` instead."] pub fn attestation(&mut self, val: AttestationConveyancePreference) -> &mut Self { - self.attestation_shim(val); + self.set_attestation(val); self } #[cfg(feature = "AuthenticatorSelectionCriteria")] - #[doc = "Change the `authenticatorSelection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_authenticator_selection()` instead."] pub fn authenticator_selection(&mut self, val: &AuthenticatorSelectionCriteria) -> &mut Self { - self.authenticator_selection_shim(val); + self.set_authenticator_selection(val); self } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { - self.challenge_shim(val); + self.set_challenge(val); self } - #[doc = "Change the `excludeCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_exclude_credentials()` instead."] pub fn exclude_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.exclude_credentials_shim(val); + self.set_exclude_credentials(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `extensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_extensions()` instead."] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.extensions_shim(val); + self.set_extensions(val); self } - #[doc = "Change the `pubKeyCredParams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_pub_key_cred_params()` instead."] pub fn pub_key_cred_params(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.pub_key_cred_params_shim(val); + self.set_pub_key_cred_params(val); self } #[cfg(feature = "PublicKeyCredentialRpEntity")] - #[doc = "Change the `rp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_rp()` instead."] pub fn rp(&mut self, val: &PublicKeyCredentialRpEntity) -> &mut Self { - self.rp_shim(val); + self.set_rp(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout(val); self } #[cfg(feature = "PublicKeyCredentialUserEntity")] - #[doc = "Change the `user` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_user()` instead."] pub fn user(&mut self, val: &PublicKeyCredentialUserEntity) -> &mut Self { - self.user_shim(val); + self.set_user(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs index c2ca7cc04d7..3781622c4b3 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] pub type PublicKeyCredentialDescriptor; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &PublicKeyCredentialDescriptor) -> ::js_sys::Object; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); + pub fn set_id(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); + #[doc = "Get the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[wasm_bindgen(method, getter = "transports")] + pub fn get_transports(this: &PublicKeyCredentialDescriptor) -> Option<::js_sys::Array>; + #[doc = "Change the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] #[wasm_bindgen(method, setter = "transports")] - fn transports_shim(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_transports(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &PublicKeyCredentialDescriptor) -> PublicKeyCredentialType; #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); + pub fn set_type(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); } impl PublicKeyCredentialDescriptor { #[cfg(feature = "PublicKeyCredentialType")] @@ -30,26 +55,20 @@ impl PublicKeyCredentialDescriptor { ret.type_(type_); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `transports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + #[deprecated = "Use `set_transports()` instead."] pub fn transports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.transports_shim(val); + self.set_transports(val); self } #[cfg(feature = "PublicKeyCredentialType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs index 6dc0e64c189..f16bcd84e13 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] pub type PublicKeyCredentialEntity; + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[wasm_bindgen(method, getter = "icon")] + pub fn get_icon(this: &PublicKeyCredentialEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialEntity, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PublicKeyCredentialEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialEntity, val: &str); } impl PublicKeyCredentialEntity { #[doc = "Construct a new `PublicKeyCredentialEntity`."] @@ -25,18 +41,14 @@ impl PublicKeyCredentialEntity { ret.name(name); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs index fd51859ddf6..a2903ffb8f2 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] pub type PublicKeyCredentialParameters; + #[doc = "Get the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] + #[wasm_bindgen(method, getter = "alg")] + pub fn get_alg(this: &PublicKeyCredentialParameters) -> i32; + #[doc = "Change the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] #[wasm_bindgen(method, setter = "alg")] - fn alg_shim(this: &PublicKeyCredentialParameters, val: i32); + pub fn set_alg(this: &PublicKeyCredentialParameters, val: i32); #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &PublicKeyCredentialParameters) -> PublicKeyCredentialType; + #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); + pub fn set_type(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); } impl PublicKeyCredentialParameters { #[cfg(feature = "PublicKeyCredentialType")] @@ -28,19 +45,15 @@ impl PublicKeyCredentialParameters { ret.type_(type_); ret } - #[doc = "Change the `alg` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] + #[deprecated = "Use `set_alg()` instead."] pub fn alg(&mut self, val: i32) -> &mut Self { - self.alg_shim(val); + self.set_alg(val); self } #[cfg(feature = "PublicKeyCredentialType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs index 3528ea3d7db..8f42a289bd5 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs @@ -10,26 +10,82 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub type PublicKeyCredentialRequestOptions; + #[doc = "Get the `allowCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "allowCredentials")] + pub fn get_allow_credentials( + this: &PublicKeyCredentialRequestOptions, + ) -> Option<::js_sys::Array>; + #[doc = "Change the `allowCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "allowCredentials")] - fn allow_credentials_shim( + pub fn set_allow_credentials( this: &PublicKeyCredentialRequestOptions, val: &::wasm_bindgen::JsValue, ); + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "challenge")] + pub fn get_challenge(this: &PublicKeyCredentialRequestOptions) -> ::js_sys::Object; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); + pub fn set_challenge(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "extensions")] + pub fn get_extensions( + this: &PublicKeyCredentialRequestOptions, + ) -> Option; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Change the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "extensions")] - fn extensions_shim( + pub fn set_extensions( this: &PublicKeyCredentialRequestOptions, val: &AuthenticationExtensionsClientInputs, ); + #[doc = "Get the `rpId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "rpId")] + pub fn get_rp_id(this: &PublicKeyCredentialRequestOptions) -> Option; + #[doc = "Change the `rpId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "rpId")] - fn rp_id_shim(this: &PublicKeyCredentialRequestOptions, val: &str); + pub fn set_rp_id(this: &PublicKeyCredentialRequestOptions, val: &str); + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[wasm_bindgen(method, getter = "timeout")] + pub fn get_timeout(this: &PublicKeyCredentialRequestOptions) -> Option; + #[doc = "Change the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PublicKeyCredentialRequestOptions, val: u32); + pub fn set_timeout(this: &PublicKeyCredentialRequestOptions, val: u32); #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Get the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] + #[wasm_bindgen(method, getter = "userVerification")] + pub fn get_user_verification( + this: &PublicKeyCredentialRequestOptions, + ) -> Option; + #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Change the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] #[wasm_bindgen(method, setter = "userVerification")] - fn user_verification_shim( + pub fn set_user_verification( this: &PublicKeyCredentialRequestOptions, val: UserVerificationRequirement, ); @@ -44,48 +100,36 @@ impl PublicKeyCredentialRequestOptions { ret.challenge(challenge); ret } - #[doc = "Change the `allowCredentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_allow_credentials()` instead."] pub fn allow_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allow_credentials_shim(val); + self.set_allow_credentials(val); self } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { - self.challenge_shim(val); + self.set_challenge(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[doc = "Change the `extensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_extensions()` instead."] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.extensions_shim(val); + self.set_extensions(val); self } - #[doc = "Change the `rpId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_rp_id()` instead."] pub fn rp_id(&mut self, val: &str) -> &mut Self { - self.rp_id_shim(val); + self.set_rp_id(val); self } - #[doc = "Change the `timeout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + #[deprecated = "Use `set_timeout()` instead."] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout(val); self } #[cfg(feature = "UserVerificationRequirement")] - #[doc = "Change the `userVerification` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] + #[deprecated = "Use `set_user_verification()` instead."] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { - self.user_verification_shim(val); + self.set_user_verification(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs index ac8318357da..1cfba5695b1 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] pub type PublicKeyCredentialRpEntity; + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[wasm_bindgen(method, getter = "icon")] + pub fn get_icon(this: &PublicKeyCredentialRpEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialRpEntity, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PublicKeyCredentialRpEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialRpEntity, val: &str); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &PublicKeyCredentialRpEntity) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialRpEntity, val: &str); + pub fn set_id(this: &PublicKeyCredentialRpEntity, val: &str); } impl PublicKeyCredentialRpEntity { #[doc = "Construct a new `PublicKeyCredentialRpEntity`."] @@ -27,25 +51,19 @@ impl PublicKeyCredentialRpEntity { ret.name(name); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs index a720e3a36e7..017f546fcc9 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub type PublicKeyCredentialUserEntity; + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[wasm_bindgen(method, getter = "icon")] + pub fn get_icon(this: &PublicKeyCredentialUserEntity) -> Option; + #[doc = "Change the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_icon(this: &PublicKeyCredentialUserEntity, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &PublicKeyCredentialUserEntity) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_name(this: &PublicKeyCredentialUserEntity, val: &str); + #[doc = "Get the `displayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[wasm_bindgen(method, getter = "displayName")] + pub fn get_display_name(this: &PublicKeyCredentialUserEntity) -> String; + #[doc = "Change the `displayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "displayName")] - fn display_name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + pub fn set_display_name(this: &PublicKeyCredentialUserEntity, val: &str); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &PublicKeyCredentialUserEntity) -> ::js_sys::Object; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); + pub fn set_id(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); } impl PublicKeyCredentialUserEntity { #[doc = "Construct a new `PublicKeyCredentialUserEntity`."] @@ -31,32 +63,24 @@ impl PublicKeyCredentialUserEntity { ret.id(id); ret } - #[doc = "Change the `icon` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_icon()` instead."] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `displayName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_display_name()` instead."] pub fn display_name(&mut self, val: &str) -> &mut Self { - self.display_name_shim(val); + self.set_display_name(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } } diff --git a/crates/web-sys/src/features/gen_PushEventInit.rs b/crates/web-sys/src/features/gen_PushEventInit.rs index 5add3d2125d..80f525bbe2d 100644 --- a/crates/web-sys/src/features/gen_PushEventInit.rs +++ b/crates/web-sys/src/features/gen_PushEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub type PushEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &PushEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PushEventInit, val: bool); + pub fn set_bubbles(this: &PushEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &PushEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PushEventInit, val: bool); + pub fn set_cancelable(this: &PushEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &PushEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PushEventInit, val: bool); + pub fn set_composed(this: &PushEventInit, val: bool); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &PushEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &PushEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &PushEventInit, val: &::wasm_bindgen::JsValue); } impl PushEventInit { #[doc = "Construct a new `PushEventInit`."] @@ -28,32 +60,24 @@ impl PushEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs index 721c813742a..5ad982d96ca 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub type PushSubscriptionInit; + #[doc = "Get the `appServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[wasm_bindgen(method, getter = "appServerKey")] + pub fn get_app_server_key(this: &PushSubscriptionInit) -> Option<::js_sys::Object>; + #[doc = "Change the `appServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "appServerKey")] - fn app_server_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); + pub fn set_app_server_key(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); + #[doc = "Get the `authSecret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[wasm_bindgen(method, getter = "authSecret")] + pub fn get_auth_secret(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `authSecret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "authSecret")] - fn auth_secret_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_auth_secret(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + #[doc = "Get the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[wasm_bindgen(method, getter = "endpoint")] + pub fn get_endpoint(this: &PushSubscriptionInit) -> String; + #[doc = "Change the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "endpoint")] - fn endpoint_shim(this: &PushSubscriptionInit, val: &str); + pub fn set_endpoint(this: &PushSubscriptionInit, val: &str); + #[doc = "Get the `p256dhKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[wasm_bindgen(method, getter = "p256dhKey")] + pub fn get_p256dh_key(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Change the `p256dhKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "p256dhKey")] - fn p256dh_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + pub fn set_p256dh_key(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[wasm_bindgen(method, getter = "scope")] + pub fn get_scope(this: &PushSubscriptionInit) -> String; + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &PushSubscriptionInit, val: &str); + pub fn set_scope(this: &PushSubscriptionInit, val: &str); } impl PushSubscriptionInit { #[doc = "Construct a new `PushSubscriptionInit`."] @@ -32,39 +72,29 @@ impl PushSubscriptionInit { ret.scope(scope); ret } - #[doc = "Change the `appServerKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_app_server_key()` instead."] pub fn app_server_key(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.app_server_key_shim(val); + self.set_app_server_key(val); self } - #[doc = "Change the `authSecret` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_auth_secret()` instead."] pub fn auth_secret(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.auth_secret_shim(val); + self.set_auth_secret(val); self } - #[doc = "Change the `endpoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_endpoint()` instead."] pub fn endpoint(&mut self, val: &str) -> &mut Self { - self.endpoint_shim(val); + self.set_endpoint(val); self } - #[doc = "Change the `p256dhKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_p256dh_key()` instead."] pub fn p256dh_key(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.p256dh_key_shim(val); + self.set_p256dh_key(val); self } - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs index 1fdb21c22bc..c3b04f9af29 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] pub type PushSubscriptionJson; + #[doc = "Get the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] + #[wasm_bindgen(method, getter = "endpoint")] + pub fn get_endpoint(this: &PushSubscriptionJson) -> Option; + #[doc = "Change the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] #[wasm_bindgen(method, setter = "endpoint")] - fn endpoint_shim(this: &PushSubscriptionJson, val: &str); + pub fn set_endpoint(this: &PushSubscriptionJson, val: &str); #[cfg(feature = "PushSubscriptionKeys")] + #[doc = "Get the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] + #[wasm_bindgen(method, getter = "keys")] + pub fn get_keys(this: &PushSubscriptionJson) -> Option; + #[cfg(feature = "PushSubscriptionKeys")] + #[doc = "Change the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "keys")] - fn keys_shim(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); + pub fn set_keys(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); } impl PushSubscriptionJson { #[doc = "Construct a new `PushSubscriptionJson`."] @@ -25,19 +42,15 @@ impl PushSubscriptionJson { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `endpoint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] + #[deprecated = "Use `set_endpoint()` instead."] pub fn endpoint(&mut self, val: &str) -> &mut Self { - self.endpoint_shim(val); + self.set_endpoint(val); self } #[cfg(feature = "PushSubscriptionKeys")] - #[doc = "Change the `keys` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_keys()` instead."] pub fn keys(&mut self, val: &PushSubscriptionKeys) -> &mut Self { - self.keys_shim(val); + self.set_keys(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs index f4b03611fba..80a07f5ef6c 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] pub type PushSubscriptionKeys; + #[doc = "Get the `auth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[wasm_bindgen(method, getter = "auth")] + pub fn get_auth(this: &PushSubscriptionKeys) -> Option; + #[doc = "Change the `auth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "auth")] - fn auth_shim(this: &PushSubscriptionKeys, val: &str); + pub fn set_auth(this: &PushSubscriptionKeys, val: &str); + #[doc = "Get the `p256dh` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[wasm_bindgen(method, getter = "p256dh")] + pub fn get_p256dh(this: &PushSubscriptionKeys) -> Option; + #[doc = "Change the `p256dh` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] #[wasm_bindgen(method, setter = "p256dh")] - fn p256dh_shim(this: &PushSubscriptionKeys, val: &str); + pub fn set_p256dh(this: &PushSubscriptionKeys, val: &str); } impl PushSubscriptionKeys { #[doc = "Construct a new `PushSubscriptionKeys`."] @@ -24,18 +40,14 @@ impl PushSubscriptionKeys { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `auth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_auth()` instead."] pub fn auth(&mut self, val: &str) -> &mut Self { - self.auth_shim(val); + self.set_auth(val); self } - #[doc = "Change the `p256dh` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + #[deprecated = "Use `set_p256dh()` instead."] pub fn p256dh(&mut self, val: &str) -> &mut Self { - self.p256dh_shim(val); + self.set_p256dh(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs index ba2ce96b985..507884a5c68 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs @@ -10,13 +10,31 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] pub type PushSubscriptionOptionsInit; + #[doc = "Get the `applicationServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[wasm_bindgen(method, getter = "applicationServerKey")] + pub fn get_application_server_key( + this: &PushSubscriptionOptionsInit, + ) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `applicationServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] #[wasm_bindgen(method, setter = "applicationServerKey")] - fn application_server_key_shim( + pub fn set_application_server_key( this: &PushSubscriptionOptionsInit, val: &::wasm_bindgen::JsValue, ); + #[doc = "Get the `userVisibleOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[wasm_bindgen(method, getter = "userVisibleOnly")] + pub fn get_user_visible_only(this: &PushSubscriptionOptionsInit) -> Option; + #[doc = "Change the `userVisibleOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] #[wasm_bindgen(method, setter = "userVisibleOnly")] - fn user_visible_only_shim(this: &PushSubscriptionOptionsInit, val: bool); + pub fn set_user_visible_only(this: &PushSubscriptionOptionsInit, val: bool); } impl PushSubscriptionOptionsInit { #[doc = "Construct a new `PushSubscriptionOptionsInit`."] @@ -27,18 +45,14 @@ impl PushSubscriptionOptionsInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `applicationServerKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[deprecated = "Use `set_application_server_key()` instead."] pub fn application_server_key(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.application_server_key_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_application_server_key(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `userVisibleOnly` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + #[deprecated = "Use `set_user_visible_only()` instead."] pub fn user_visible_only(&mut self, val: bool) -> &mut Self { - self.user_visible_only_shim(val); + self.set_user_visible_only(val); self } } diff --git a/crates/web-sys/src/features/gen_QueryOptions.rs b/crates/web-sys/src/features/gen_QueryOptions.rs index 6ef1d3ad6c0..b1a58c5a564 100644 --- a/crates/web-sys/src/features/gen_QueryOptions.rs +++ b/crates/web-sys/src/features/gen_QueryOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type QueryOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `postscriptNames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "postscriptNames")] + pub fn get_postscript_names(this: &QueryOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `postscriptNames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "postscriptNames")] - fn postscript_names_shim(this: &QueryOptions, val: &::wasm_bindgen::JsValue); + pub fn set_postscript_names(this: &QueryOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl QueryOptions { @@ -31,14 +47,9 @@ impl QueryOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `postscriptNames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_postscript_names()` instead."] pub fn postscript_names(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.postscript_names_shim(val); + self.set_postscript_names(val); self } } diff --git a/crates/web-sys/src/features/gen_QueuingStrategy.rs b/crates/web-sys/src/features/gen_QueuingStrategy.rs index 9ecbfa23cd1..6d22b29060a 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategy.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategy.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] pub type QueuingStrategy; + #[doc = "Get the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[wasm_bindgen(method, getter = "highWaterMark")] + pub fn get_high_water_mark(this: &QueuingStrategy) -> Option; + #[doc = "Change the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, setter = "highWaterMark")] - fn high_water_mark_shim(this: &QueuingStrategy, val: f64); + pub fn set_high_water_mark(this: &QueuingStrategy, val: f64); + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &QueuingStrategy) -> Option<::js_sys::Function>; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &QueuingStrategy, val: &::js_sys::Function); + pub fn set_size(this: &QueuingStrategy, val: &::js_sys::Function); } impl QueuingStrategy { #[doc = "Construct a new `QueuingStrategy`."] @@ -24,18 +40,14 @@ impl QueuingStrategy { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `highWaterMark` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[deprecated = "Use `set_high_water_mark()` instead."] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { - self.high_water_mark_shim(val); + self.set_high_water_mark(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: &::js_sys::Function) -> &mut Self { - self.size_shim(val); + self.set_size(val); self } } diff --git a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs index 42523cd8b2f..e917016bf96 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] pub type QueuingStrategyInit; + #[doc = "Get the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] + #[wasm_bindgen(method, getter = "highWaterMark")] + pub fn get_high_water_mark(this: &QueuingStrategyInit) -> f64; + #[doc = "Change the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] #[wasm_bindgen(method, setter = "highWaterMark")] - fn high_water_mark_shim(this: &QueuingStrategyInit, val: f64); + pub fn set_high_water_mark(this: &QueuingStrategyInit, val: f64); } impl QueuingStrategyInit { #[doc = "Construct a new `QueuingStrategyInit`."] @@ -23,11 +31,9 @@ impl QueuingStrategyInit { ret.high_water_mark(high_water_mark); ret } - #[doc = "Change the `highWaterMark` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] + #[deprecated = "Use `set_high_water_mark()` instead."] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { - self.high_water_mark_shim(val); + self.set_high_water_mark(val); self } } diff --git a/crates/web-sys/src/features/gen_RcwnPerfStats.rs b/crates/web-sys/src/features/gen_RcwnPerfStats.rs index ee8fc7c302a..b3cb7fd5b11 100644 --- a/crates/web-sys/src/features/gen_RcwnPerfStats.rs +++ b/crates/web-sys/src/features/gen_RcwnPerfStats.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] pub type RcwnPerfStats; + #[doc = "Get the `avgLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[wasm_bindgen(method, getter = "avgLong")] + pub fn get_avg_long(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `avgLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "avgLong")] - fn avg_long_shim(this: &RcwnPerfStats, val: u32); + pub fn set_avg_long(this: &RcwnPerfStats, val: u32); + #[doc = "Get the `avgShort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[wasm_bindgen(method, getter = "avgShort")] + pub fn get_avg_short(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `avgShort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "avgShort")] - fn avg_short_shim(this: &RcwnPerfStats, val: u32); + pub fn set_avg_short(this: &RcwnPerfStats, val: u32); + #[doc = "Get the `stddevLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[wasm_bindgen(method, getter = "stddevLong")] + pub fn get_stddev_long(this: &RcwnPerfStats) -> Option; + #[doc = "Change the `stddevLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] #[wasm_bindgen(method, setter = "stddevLong")] - fn stddev_long_shim(this: &RcwnPerfStats, val: u32); + pub fn set_stddev_long(this: &RcwnPerfStats, val: u32); } impl RcwnPerfStats { #[doc = "Construct a new `RcwnPerfStats`."] @@ -26,25 +50,19 @@ impl RcwnPerfStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `avgLong` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_avg_long()` instead."] pub fn avg_long(&mut self, val: u32) -> &mut Self { - self.avg_long_shim(val); + self.set_avg_long(val); self } - #[doc = "Change the `avgShort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_avg_short()` instead."] pub fn avg_short(&mut self, val: u32) -> &mut Self { - self.avg_short_shim(val); + self.set_avg_short(val); self } - #[doc = "Change the `stddevLong` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + #[deprecated = "Use `set_stddev_long()` instead."] pub fn stddev_long(&mut self, val: u32) -> &mut Self { - self.stddev_long_shim(val); + self.set_stddev_long(val); self } } diff --git a/crates/web-sys/src/features/gen_RcwnStatus.rs b/crates/web-sys/src/features/gen_RcwnStatus.rs index e29982da89e..c6a0d927176 100644 --- a/crates/web-sys/src/features/gen_RcwnStatus.rs +++ b/crates/web-sys/src/features/gen_RcwnStatus.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub type RcwnStatus; + #[doc = "Get the `cacheNotSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "cacheNotSlowCount")] + pub fn get_cache_not_slow_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `cacheNotSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "cacheNotSlowCount")] - fn cache_not_slow_count_shim(this: &RcwnStatus, val: u32); + pub fn set_cache_not_slow_count(this: &RcwnStatus, val: u32); + #[doc = "Get the `cacheSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "cacheSlowCount")] + pub fn get_cache_slow_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `cacheSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "cacheSlowCount")] - fn cache_slow_count_shim(this: &RcwnStatus, val: u32); + pub fn set_cache_slow_count(this: &RcwnStatus, val: u32); + #[doc = "Get the `perfStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "perfStats")] + pub fn get_perf_stats(this: &RcwnStatus) -> Option<::js_sys::Array>; + #[doc = "Change the `perfStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "perfStats")] - fn perf_stats_shim(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); + pub fn set_perf_stats(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `rcwnCacheWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "rcwnCacheWonCount")] + pub fn get_rcwn_cache_won_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `rcwnCacheWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "rcwnCacheWonCount")] - fn rcwn_cache_won_count_shim(this: &RcwnStatus, val: u32); + pub fn set_rcwn_cache_won_count(this: &RcwnStatus, val: u32); + #[doc = "Get the `rcwnNetWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "rcwnNetWonCount")] + pub fn get_rcwn_net_won_count(this: &RcwnStatus) -> Option; + #[doc = "Change the `rcwnNetWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "rcwnNetWonCount")] - fn rcwn_net_won_count_shim(this: &RcwnStatus, val: u32); + pub fn set_rcwn_net_won_count(this: &RcwnStatus, val: u32); + #[doc = "Get the `totalNetworkRequests` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[wasm_bindgen(method, getter = "totalNetworkRequests")] + pub fn get_total_network_requests(this: &RcwnStatus) -> Option; + #[doc = "Change the `totalNetworkRequests` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] #[wasm_bindgen(method, setter = "totalNetworkRequests")] - fn total_network_requests_shim(this: &RcwnStatus, val: u32); + pub fn set_total_network_requests(this: &RcwnStatus, val: u32); } impl RcwnStatus { #[doc = "Construct a new `RcwnStatus`."] @@ -32,46 +80,34 @@ impl RcwnStatus { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cacheNotSlowCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_cache_not_slow_count()` instead."] pub fn cache_not_slow_count(&mut self, val: u32) -> &mut Self { - self.cache_not_slow_count_shim(val); + self.set_cache_not_slow_count(val); self } - #[doc = "Change the `cacheSlowCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_cache_slow_count()` instead."] pub fn cache_slow_count(&mut self, val: u32) -> &mut Self { - self.cache_slow_count_shim(val); + self.set_cache_slow_count(val); self } - #[doc = "Change the `perfStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_perf_stats()` instead."] pub fn perf_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.perf_stats_shim(val); + self.set_perf_stats(val); self } - #[doc = "Change the `rcwnCacheWonCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_rcwn_cache_won_count()` instead."] pub fn rcwn_cache_won_count(&mut self, val: u32) -> &mut Self { - self.rcwn_cache_won_count_shim(val); + self.set_rcwn_cache_won_count(val); self } - #[doc = "Change the `rcwnNetWonCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_rcwn_net_won_count()` instead."] pub fn rcwn_net_won_count(&mut self, val: u32) -> &mut Self { - self.rcwn_net_won_count_shim(val); + self.set_rcwn_net_won_count(val); self } - #[doc = "Change the `totalNetworkRequests` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + #[deprecated = "Use `set_total_network_requests()` instead."] pub fn total_network_requests(&mut self, val: u32) -> &mut Self { - self.total_network_requests_shim(val); + self.set_total_network_requests(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs index ba38a2a7cd6..0cf5d910ca9 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`*"] pub type ReadableStreamGetReaderOptions; #[cfg(feature = "ReadableStreamReaderMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &ReadableStreamGetReaderOptions) -> Option; + #[cfg(feature = "ReadableStreamReaderMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); + pub fn set_mode(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); } impl ReadableStreamGetReaderOptions { #[doc = "Construct a new `ReadableStreamGetReaderOptions`."] @@ -24,11 +33,9 @@ impl ReadableStreamGetReaderOptions { ret } #[cfg(feature = "ReadableStreamReaderMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: ReadableStreamReaderMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs index bd432a43d33..cc5b87e0bd2 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] pub type ReadableStreamIteratorOptions; + #[doc = "Get the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] + #[wasm_bindgen(method, getter = "preventCancel")] + pub fn get_prevent_cancel(this: &ReadableStreamIteratorOptions) -> Option; + #[doc = "Change the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] #[wasm_bindgen(method, setter = "preventCancel")] - fn prevent_cancel_shim(this: &ReadableStreamIteratorOptions, val: bool); + pub fn set_prevent_cancel(this: &ReadableStreamIteratorOptions, val: bool); } impl ReadableStreamIteratorOptions { #[doc = "Construct a new `ReadableStreamIteratorOptions`."] @@ -22,11 +30,9 @@ impl ReadableStreamIteratorOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `preventCancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] + #[deprecated = "Use `set_prevent_cancel()` instead."] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { - self.prevent_cancel_shim(val); + self.set_prevent_cancel(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs index 1ee926ae577..9f22eb0a1eb 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] pub type ReadableStreamReadResult; + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[wasm_bindgen(method, getter = "done")] + pub fn get_done(this: &ReadableStreamReadResult) -> Option; + #[doc = "Change the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &ReadableStreamReadResult, val: bool); + pub fn set_done(this: &ReadableStreamReadResult, val: bool); + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &ReadableStreamReadResult) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); + pub fn set_value(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); } impl ReadableStreamReadResult { #[doc = "Construct a new `ReadableStreamReadResult`."] @@ -24,18 +40,14 @@ impl ReadableStreamReadResult { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `done` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[deprecated = "Use `set_done()` instead."] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done(val); self } - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableWritablePair.rs b/crates/web-sys/src/features/gen_ReadableWritablePair.rs index 3079c8805c3..5b15a0cf997 100644 --- a/crates/web-sys/src/features/gen_ReadableWritablePair.rs +++ b/crates/web-sys/src/features/gen_ReadableWritablePair.rs @@ -11,11 +11,29 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`*"] pub type ReadableWritablePair; #[cfg(feature = "ReadableStream")] + #[doc = "Get the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] + #[wasm_bindgen(method, getter = "readable")] + pub fn get_readable(this: &ReadableWritablePair) -> ReadableStream; + #[cfg(feature = "ReadableStream")] + #[doc = "Change the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] #[wasm_bindgen(method, setter = "readable")] - fn readable_shim(this: &ReadableWritablePair, val: &ReadableStream); + pub fn set_readable(this: &ReadableWritablePair, val: &ReadableStream); + #[cfg(feature = "WritableStream")] + #[doc = "Get the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] + #[wasm_bindgen(method, getter = "writable")] + pub fn get_writable(this: &ReadableWritablePair) -> WritableStream; #[cfg(feature = "WritableStream")] + #[doc = "Change the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] #[wasm_bindgen(method, setter = "writable")] - fn writable_shim(this: &ReadableWritablePair, val: &WritableStream); + pub fn set_writable(this: &ReadableWritablePair, val: &WritableStream); } impl ReadableWritablePair { #[cfg(all(feature = "ReadableStream", feature = "WritableStream",))] @@ -30,19 +48,15 @@ impl ReadableWritablePair { ret } #[cfg(feature = "ReadableStream")] - #[doc = "Change the `readable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] + #[deprecated = "Use `set_readable()` instead."] pub fn readable(&mut self, val: &ReadableStream) -> &mut Self { - self.readable_shim(val); + self.set_readable(val); self } #[cfg(feature = "WritableStream")] - #[doc = "Change the `writable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] + #[deprecated = "Use `set_writable()` instead."] pub fn writable(&mut self, val: &WritableStream) -> &mut Self { - self.writable_shim(val); + self.set_writable(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisterRequest.rs b/crates/web-sys/src/features/gen_RegisterRequest.rs index f35b3953389..0b3c741d805 100644 --- a/crates/web-sys/src/features/gen_RegisterRequest.rs +++ b/crates/web-sys/src/features/gen_RegisterRequest.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] pub type RegisterRequest; + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[wasm_bindgen(method, getter = "challenge")] + pub fn get_challenge(this: &RegisterRequest) -> Option; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &RegisterRequest, val: &str); + pub fn set_challenge(this: &RegisterRequest, val: &str); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &RegisterRequest) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisterRequest, val: &str); + pub fn set_version(this: &RegisterRequest, val: &str); } impl RegisterRequest { #[doc = "Construct a new `RegisterRequest`."] @@ -24,18 +40,14 @@ impl RegisterRequest { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisterResponse.rs b/crates/web-sys/src/features/gen_RegisterResponse.rs index eb73afa5f2c..3ec0f53e6b9 100644 --- a/crates/web-sys/src/features/gen_RegisterResponse.rs +++ b/crates/web-sys/src/features/gen_RegisterResponse.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub type RegisterResponse; + #[doc = "Get the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[wasm_bindgen(method, getter = "clientData")] + pub fn get_client_data(this: &RegisterResponse) -> Option; + #[doc = "Change the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "clientData")] - fn client_data_shim(this: &RegisterResponse, val: &str); + pub fn set_client_data(this: &RegisterResponse, val: &str); + #[doc = "Get the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[wasm_bindgen(method, getter = "errorCode")] + pub fn get_error_code(this: &RegisterResponse) -> Option; + #[doc = "Change the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "errorCode")] - fn error_code_shim(this: &RegisterResponse, val: Option); + pub fn set_error_code(this: &RegisterResponse, val: Option); + #[doc = "Get the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[wasm_bindgen(method, getter = "errorMessage")] + pub fn get_error_message(this: &RegisterResponse) -> Option; + #[doc = "Change the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "errorMessage")] - fn error_message_shim(this: &RegisterResponse, val: Option<&str>); + pub fn set_error_message(this: &RegisterResponse, val: Option<&str>); + #[doc = "Get the `registrationData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[wasm_bindgen(method, getter = "registrationData")] + pub fn get_registration_data(this: &RegisterResponse) -> Option; + #[doc = "Change the `registrationData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "registrationData")] - fn registration_data_shim(this: &RegisterResponse, val: &str); + pub fn set_registration_data(this: &RegisterResponse, val: &str); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &RegisterResponse) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisterResponse, val: &str); + pub fn set_version(this: &RegisterResponse, val: &str); } impl RegisterResponse { #[doc = "Construct a new `RegisterResponse`."] @@ -30,39 +70,29 @@ impl RegisterResponse { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clientData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_client_data()` instead."] pub fn client_data(&mut self, val: &str) -> &mut Self { - self.client_data_shim(val); + self.set_client_data(val); self } - #[doc = "Change the `errorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_error_code()` instead."] pub fn error_code(&mut self, val: Option) -> &mut Self { - self.error_code_shim(val); + self.set_error_code(val); self } - #[doc = "Change the `errorMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_error_message()` instead."] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { - self.error_message_shim(val); + self.set_error_message(val); self } - #[doc = "Change the `registrationData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_registration_data()` instead."] pub fn registration_data(&mut self, val: &str) -> &mut Self { - self.registration_data_shim(val); + self.set_registration_data(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisteredKey.rs b/crates/web-sys/src/features/gen_RegisteredKey.rs index 34f727cbab4..9698b9c89c3 100644 --- a/crates/web-sys/src/features/gen_RegisteredKey.rs +++ b/crates/web-sys/src/features/gen_RegisteredKey.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub type RegisteredKey; + #[doc = "Get the `appId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[wasm_bindgen(method, getter = "appId")] + pub fn get_app_id(this: &RegisteredKey) -> Option; + #[doc = "Change the `appId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "appId")] - fn app_id_shim(this: &RegisteredKey, val: Option<&str>); + pub fn set_app_id(this: &RegisteredKey, val: Option<&str>); + #[doc = "Get the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[wasm_bindgen(method, getter = "keyHandle")] + pub fn get_key_handle(this: &RegisteredKey) -> Option; + #[doc = "Change the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "keyHandle")] - fn key_handle_shim(this: &RegisteredKey, val: &str); + pub fn set_key_handle(this: &RegisteredKey, val: &str); + #[doc = "Get the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[wasm_bindgen(method, getter = "transports")] + pub fn get_transports(this: &RegisteredKey) -> Option<::js_sys::Array>; + #[doc = "Change the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "transports")] - fn transports_shim(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); + pub fn set_transports(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &RegisteredKey) -> Option; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisteredKey, val: &str); + pub fn set_version(this: &RegisteredKey, val: &str); } impl RegisteredKey { #[doc = "Construct a new `RegisteredKey`."] @@ -28,32 +60,24 @@ impl RegisteredKey { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `appId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_app_id()` instead."] pub fn app_id(&mut self, val: Option<&str>) -> &mut Self { - self.app_id_shim(val); + self.set_app_id(val); self } - #[doc = "Change the `keyHandle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_key_handle()` instead."] pub fn key_handle(&mut self, val: &str) -> &mut Self { - self.key_handle_shim(val); + self.set_key_handle(val); self } - #[doc = "Change the `transports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_transports()` instead."] pub fn transports(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.transports_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_transports(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } } diff --git a/crates/web-sys/src/features/gen_RegistrationOptions.rs b/crates/web-sys/src/features/gen_RegistrationOptions.rs index 8d635369a40..fe380286b6f 100644 --- a/crates/web-sys/src/features/gen_RegistrationOptions.rs +++ b/crates/web-sys/src/features/gen_RegistrationOptions.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] pub type RegistrationOptions; + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[wasm_bindgen(method, getter = "scope")] + pub fn get_scope(this: &RegistrationOptions) -> Option; + #[doc = "Change the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &RegistrationOptions, val: &str); + pub fn set_scope(this: &RegistrationOptions, val: &str); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RegistrationOptions) -> Option; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RegistrationOptions, val: &str); + pub fn set_type(this: &RegistrationOptions, val: &str); + #[cfg(feature = "ServiceWorkerUpdateViaCache")] + #[doc = "Get the `updateViaCache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] + #[wasm_bindgen(method, getter = "updateViaCache")] + pub fn get_update_via_cache(this: &RegistrationOptions) -> Option; #[cfg(feature = "ServiceWorkerUpdateViaCache")] + #[doc = "Change the `updateViaCache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] #[wasm_bindgen(method, setter = "updateViaCache")] - fn update_via_cache_shim(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); + pub fn set_update_via_cache(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); } impl RegistrationOptions { #[doc = "Construct a new `RegistrationOptions`."] @@ -27,26 +52,20 @@ impl RegistrationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `scope` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[deprecated = "Use `set_scope()` instead."] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } #[cfg(feature = "ServiceWorkerUpdateViaCache")] - #[doc = "Change the `updateViaCache` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] + #[deprecated = "Use `set_update_via_cache()` instead."] pub fn update_via_cache(&mut self, val: ServiceWorkerUpdateViaCache) -> &mut Self { - self.update_via_cache_shim(val); + self.set_update_via_cache(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs index 85f4a2b5498..265dec607e0 100644 --- a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs +++ b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type RequestDeviceOptions; - #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn accept_all_devices_shim(this: &RequestDeviceOptions, val: bool); - #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "optionalServices")] - fn optional_services_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl RequestDeviceOptions { - #[doc = "Construct a new `RequestDeviceOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `acceptAllDevices` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "acceptAllDevices")] + pub fn get_accept_all_devices(this: &RequestDeviceOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `acceptAllDevices` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl RequestDeviceOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { - self.accept_all_devices_shim(val); - self - } + #[wasm_bindgen(method, setter = "acceptAllDevices")] + pub fn set_accept_all_devices(this: &RequestDeviceOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &RequestDeviceOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `filters` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl RequestDeviceOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); - self - } + #[wasm_bindgen(method, setter = "filters")] + pub fn set_filters(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "optionalServices")] + pub fn get_optional_services(this: &RequestDeviceOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `optionalServices` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl RequestDeviceOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "optionalServices")] + pub fn set_optional_services(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl RequestDeviceOptions { + #[doc = "Construct a new `RequestDeviceOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_accept_all_devices()` instead."] + pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { + self.set_accept_all_devices(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_filters()` instead."] + pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_filters(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_optional_services()` instead."] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_services_shim(val); + self.set_optional_services(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestInit.rs b/crates/web-sys/src/features/gen_RequestInit.rs index 532bdea1691..ed3eb257b7e 100644 --- a/crates/web-sys/src/features/gen_RequestInit.rs +++ b/crates/web-sys/src/features/gen_RequestInit.rs @@ -10,37 +10,140 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub type RequestInit; + #[doc = "Get the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[wasm_bindgen(method, getter = "body")] + pub fn get_body(this: &RequestInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "body")] - fn body_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + pub fn set_body(this: &RequestInit, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RequestCache")] + #[doc = "Get the `cache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] + #[wasm_bindgen(method, getter = "cache")] + pub fn get_cache(this: &RequestInit) -> Option; + #[cfg(feature = "RequestCache")] + #[doc = "Change the `cache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] #[wasm_bindgen(method, setter = "cache")] - fn cache_shim(this: &RequestInit, val: RequestCache); + pub fn set_cache(this: &RequestInit, val: RequestCache); + #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] + #[wasm_bindgen(method, getter = "credentials")] + pub fn get_credentials(this: &RequestInit) -> Option; #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &RequestInit, val: RequestCredentials); + pub fn set_credentials(this: &RequestInit, val: RequestCredentials); + #[doc = "Get the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[wasm_bindgen(method, getter = "headers")] + pub fn get_headers(this: &RequestInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "headers")] - fn headers_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + pub fn set_headers(this: &RequestInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `integrity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[wasm_bindgen(method, getter = "integrity")] + pub fn get_integrity(this: &RequestInit) -> Option; + #[doc = "Change the `integrity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "integrity")] - fn integrity_shim(this: &RequestInit, val: &str); + pub fn set_integrity(this: &RequestInit, val: &str); + #[doc = "Get the `method` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[wasm_bindgen(method, getter = "method")] + pub fn get_method(this: &RequestInit) -> Option; + #[doc = "Change the `method` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "method")] - fn method_shim(this: &RequestInit, val: &str); + pub fn set_method(this: &RequestInit, val: &str); #[cfg(feature = "RequestMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &RequestInit) -> Option; + #[cfg(feature = "RequestMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &RequestInit, val: RequestMode); + pub fn set_mode(this: &RequestInit, val: RequestMode); + #[cfg(feature = "ObserverCallback")] + #[doc = "Get the `observe` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] + #[wasm_bindgen(method, getter = "observe")] + pub fn get_observe(this: &RequestInit) -> Option; #[cfg(feature = "ObserverCallback")] + #[doc = "Change the `observe` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] #[wasm_bindgen(method, setter = "observe")] - fn observe_shim(this: &RequestInit, val: &ObserverCallback); + pub fn set_observe(this: &RequestInit, val: &ObserverCallback); #[cfg(feature = "RequestRedirect")] + #[doc = "Get the `redirect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] + #[wasm_bindgen(method, getter = "redirect")] + pub fn get_redirect(this: &RequestInit) -> Option; + #[cfg(feature = "RequestRedirect")] + #[doc = "Change the `redirect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] #[wasm_bindgen(method, setter = "redirect")] - fn redirect_shim(this: &RequestInit, val: RequestRedirect); + pub fn set_redirect(this: &RequestInit, val: RequestRedirect); + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[wasm_bindgen(method, getter = "referrer")] + pub fn get_referrer(this: &RequestInit) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &RequestInit, val: &str); + pub fn set_referrer(this: &RequestInit, val: &str); #[cfg(feature = "ReferrerPolicy")] + #[doc = "Get the `referrerPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] + #[wasm_bindgen(method, getter = "referrerPolicy")] + pub fn get_referrer_policy(this: &RequestInit) -> Option; + #[cfg(feature = "ReferrerPolicy")] + #[doc = "Change the `referrerPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] #[wasm_bindgen(method, setter = "referrerPolicy")] - fn referrer_policy_shim(this: &RequestInit, val: ReferrerPolicy); + pub fn set_referrer_policy(this: &RequestInit, val: ReferrerPolicy); + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &RequestInit) -> Option; #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &RequestInit, val: Option<&AbortSignal>); + pub fn set_signal(this: &RequestInit, val: Option<&AbortSignal>); } impl RequestInit { #[doc = "Construct a new `RequestInit`."] @@ -51,95 +154,71 @@ impl RequestInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `body` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_body()` instead."] pub fn body(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.body_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_body(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[cfg(feature = "RequestCache")] - #[doc = "Change the `cache` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] + #[deprecated = "Use `set_cache()` instead."] pub fn cache(&mut self, val: RequestCache) -> &mut Self { - self.cache_shim(val); + self.set_cache(val); self } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials(val); self } - #[doc = "Change the `headers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_headers()` instead."] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.headers_shim(val); + self.set_headers(val); self } - #[doc = "Change the `integrity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_integrity()` instead."] pub fn integrity(&mut self, val: &str) -> &mut Self { - self.integrity_shim(val); + self.set_integrity(val); self } - #[doc = "Change the `method` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_method()` instead."] pub fn method(&mut self, val: &str) -> &mut Self { - self.method_shim(val); + self.set_method(val); self } #[cfg(feature = "RequestMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: RequestMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } #[cfg(feature = "ObserverCallback")] - #[doc = "Change the `observe` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] + #[deprecated = "Use `set_observe()` instead."] pub fn observe(&mut self, val: &ObserverCallback) -> &mut Self { - self.observe_shim(val); + self.set_observe(val); self } #[cfg(feature = "RequestRedirect")] - #[doc = "Change the `redirect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] + #[deprecated = "Use `set_redirect()` instead."] pub fn redirect(&mut self, val: RequestRedirect) -> &mut Self { - self.redirect_shim(val); + self.set_redirect(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: &str) -> &mut Self { - self.referrer_shim(val); + self.set_referrer(val); self } #[cfg(feature = "ReferrerPolicy")] - #[doc = "Change the `referrerPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] + #[deprecated = "Use `set_referrer_policy()` instead."] pub fn referrer_policy(&mut self, val: ReferrerPolicy) -> &mut Self { - self.referrer_policy_shim(val); + self.set_referrer_policy(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: Option<&AbortSignal>) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs index ea79accc1ef..5c0c2f0758b 100644 --- a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs +++ b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] pub type RequestMediaKeySystemAccessNotification; + #[doc = "Get the `keySystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] + #[wasm_bindgen(method, getter = "keySystem")] + pub fn get_key_system(this: &RequestMediaKeySystemAccessNotification) -> String; + #[doc = "Change the `keySystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] #[wasm_bindgen(method, setter = "keySystem")] - fn key_system_shim(this: &RequestMediaKeySystemAccessNotification, val: &str); + pub fn set_key_system(this: &RequestMediaKeySystemAccessNotification, val: &str); #[cfg(feature = "MediaKeySystemStatus")] + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] + #[wasm_bindgen(method, getter = "status")] + pub fn get_status(this: &RequestMediaKeySystemAccessNotification) -> MediaKeySystemStatus; + #[cfg(feature = "MediaKeySystemStatus")] + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); + pub fn set_status(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); } impl RequestMediaKeySystemAccessNotification { #[cfg(feature = "MediaKeySystemStatus")] @@ -28,19 +45,15 @@ impl RequestMediaKeySystemAccessNotification { ret.status(status); ret } - #[doc = "Change the `keySystem` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] + #[deprecated = "Use `set_key_system()` instead."] pub fn key_system(&mut self, val: &str) -> &mut Self { - self.key_system_shim(val); + self.set_key_system(val); self } #[cfg(feature = "MediaKeySystemStatus")] - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: MediaKeySystemStatus) -> &mut Self { - self.status_shim(val); + self.set_status(val); self } } diff --git a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs index 322f2fbd507..07d824be9ac 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*"] pub type ResizeObserverOptions; #[cfg(feature = "ResizeObserverBoxOptions")] + #[doc = "Get the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] + #[wasm_bindgen(method, getter = "box")] + pub fn get_box(this: &ResizeObserverOptions) -> Option; + #[cfg(feature = "ResizeObserverBoxOptions")] + #[doc = "Change the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] #[wasm_bindgen(method, setter = "box")] - fn box__shim(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); + pub fn set_box(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); } impl ResizeObserverOptions { #[doc = "Construct a new `ResizeObserverOptions`."] @@ -24,11 +33,9 @@ impl ResizeObserverOptions { ret } #[cfg(feature = "ResizeObserverBoxOptions")] - #[doc = "Change the `box` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] + #[deprecated = "Use `set_box()` instead."] pub fn box_(&mut self, val: ResizeObserverBoxOptions) -> &mut Self { - self.box__shim(val); + self.set_box(val); self } } diff --git a/crates/web-sys/src/features/gen_ResponseInit.rs b/crates/web-sys/src/features/gen_ResponseInit.rs index 4466e72567d..0d65c079458 100644 --- a/crates/web-sys/src/features/gen_ResponseInit.rs +++ b/crates/web-sys/src/features/gen_ResponseInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] pub type ResponseInit; + #[doc = "Get the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[wasm_bindgen(method, getter = "headers")] + pub fn get_headers(this: &ResponseInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "headers")] - fn headers_shim(this: &ResponseInit, val: &::wasm_bindgen::JsValue); + pub fn set_headers(this: &ResponseInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[wasm_bindgen(method, getter = "status")] + pub fn get_status(this: &ResponseInit) -> Option; + #[doc = "Change the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &ResponseInit, val: u16); + pub fn set_status(this: &ResponseInit, val: u16); + #[doc = "Get the `statusText` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[wasm_bindgen(method, getter = "statusText")] + pub fn get_status_text(this: &ResponseInit) -> Option; + #[doc = "Change the `statusText` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] #[wasm_bindgen(method, setter = "statusText")] - fn status_text_shim(this: &ResponseInit, val: &str); + pub fn set_status_text(this: &ResponseInit, val: &str); } impl ResponseInit { #[doc = "Construct a new `ResponseInit`."] @@ -26,25 +50,19 @@ impl ResponseInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `headers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_headers()` instead."] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.headers_shim(val); + self.set_headers(val); self } - #[doc = "Change the `status` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_status()` instead."] pub fn status(&mut self, val: u16) -> &mut Self { - self.status_shim(val); + self.set_status(val); self } - #[doc = "Change the `statusText` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + #[deprecated = "Use `set_status_text()` instead."] pub fn status_text(&mut self, val: &str) -> &mut Self { - self.status_text_shim(val); + self.set_status_text(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs index fd4c25042b3..f9f3a04a3fb 100644 --- a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs +++ b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] pub type RsaHashedImportParams; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] + #[wasm_bindgen(method, getter = "hash")] + pub fn get_hash(this: &RsaHashedImportParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); + pub fn set_hash(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); } impl RsaHashedImportParams { #[doc = "Construct a new `RsaHashedImportParams`."] @@ -23,11 +31,9 @@ impl RsaHashedImportParams { ret.hash(hash); ret } - #[doc = "Change the `hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] + #[deprecated = "Use `set_hash()` instead."] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaOaepParams.rs b/crates/web-sys/src/features/gen_RsaOaepParams.rs index a500ce24ee7..f0ae80e6358 100644 --- a/crates/web-sys/src/features/gen_RsaOaepParams.rs +++ b/crates/web-sys/src/features/gen_RsaOaepParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] pub type RsaOaepParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &RsaOaepParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RsaOaepParams, val: &str); + pub fn set_name(this: &RsaOaepParams, val: &str); + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[wasm_bindgen(method, getter = "label")] + pub fn get_label(this: &RsaOaepParams) -> Option<::js_sys::Object>; + #[doc = "Change the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &RsaOaepParams, val: &::js_sys::Object); + pub fn set_label(this: &RsaOaepParams, val: &::js_sys::Object); } impl RsaOaepParams { #[doc = "Construct a new `RsaOaepParams`."] @@ -25,18 +41,14 @@ impl RsaOaepParams { ret.name(name); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `label` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &::js_sys::Object) -> &mut Self { - self.label_shim(val); + self.set_label(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs index 4071e4cd036..d31ec101bce 100644 --- a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs +++ b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] pub type RsaOtherPrimesInfo; + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[wasm_bindgen(method, getter = "d")] + pub fn get_d(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_d(this: &RsaOtherPrimesInfo, val: &str); + #[doc = "Get the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[wasm_bindgen(method, getter = "r")] + pub fn get_r(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "r")] - fn r_shim(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_r(this: &RsaOtherPrimesInfo, val: &str); + #[doc = "Get the `t` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[wasm_bindgen(method, getter = "t")] + pub fn get_t(this: &RsaOtherPrimesInfo) -> String; + #[doc = "Change the `t` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] #[wasm_bindgen(method, setter = "t")] - fn t_shim(this: &RsaOtherPrimesInfo, val: &str); + pub fn set_t(this: &RsaOtherPrimesInfo, val: &str); } impl RsaOtherPrimesInfo { #[doc = "Construct a new `RsaOtherPrimesInfo`."] @@ -29,25 +53,19 @@ impl RsaOtherPrimesInfo { ret.t(t); ret } - #[doc = "Change the `d` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_d()` instead."] pub fn d(&mut self, val: &str) -> &mut Self { - self.d_shim(val); + self.set_d(val); self } - #[doc = "Change the `r` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_r()` instead."] pub fn r(&mut self, val: &str) -> &mut Self { - self.r_shim(val); + self.set_r(val); self } - #[doc = "Change the `t` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + #[deprecated = "Use `set_t()` instead."] pub fn t(&mut self, val: &str) -> &mut Self { - self.t_shim(val); + self.set_t(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaPssParams.rs b/crates/web-sys/src/features/gen_RsaPssParams.rs index 49ece0023e9..1fd87410283 100644 --- a/crates/web-sys/src/features/gen_RsaPssParams.rs +++ b/crates/web-sys/src/features/gen_RsaPssParams.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] pub type RsaPssParams; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &RsaPssParams) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RsaPssParams, val: &str); + pub fn set_name(this: &RsaPssParams, val: &str); + #[doc = "Get the `saltLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[wasm_bindgen(method, getter = "saltLength")] + pub fn get_salt_length(this: &RsaPssParams) -> u32; + #[doc = "Change the `saltLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] #[wasm_bindgen(method, setter = "saltLength")] - fn salt_length_shim(this: &RsaPssParams, val: u32); + pub fn set_salt_length(this: &RsaPssParams, val: u32); } impl RsaPssParams { #[doc = "Construct a new `RsaPssParams`."] @@ -26,18 +42,14 @@ impl RsaPssParams { ret.salt_length(salt_length); ret } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `saltLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + #[deprecated = "Use `set_salt_length()` instead."] pub fn salt_length(&mut self, val: u32) -> &mut Self { - self.salt_length_shim(val); + self.set_salt_length(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs index 7eab6969f61..e11293272df 100644 --- a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs +++ b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] pub type RtcCertificateExpiration; + #[doc = "Get the `expires` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] + #[wasm_bindgen(method, getter = "expires")] + pub fn get_expires(this: &RtcCertificateExpiration) -> Option; + #[doc = "Change the `expires` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] #[wasm_bindgen(method, setter = "expires")] - fn expires_shim(this: &RtcCertificateExpiration, val: f64); + pub fn set_expires(this: &RtcCertificateExpiration, val: f64); } impl RtcCertificateExpiration { #[doc = "Construct a new `RtcCertificateExpiration`."] @@ -22,11 +30,9 @@ impl RtcCertificateExpiration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `expires` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] + #[deprecated = "Use `set_expires()` instead."] pub fn expires(&mut self, val: f64) -> &mut Self { - self.expires_shim(val); + self.set_expires(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcCodecStats.rs b/crates/web-sys/src/features/gen_RtcCodecStats.rs index 3fbd0842d81..81bcee55873 100644 --- a/crates/web-sys/src/features/gen_RtcCodecStats.rs +++ b/crates/web-sys/src/features/gen_RtcCodecStats.rs @@ -10,23 +10,88 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub type RtcCodecStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcCodecStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcCodecStats, val: &str); + pub fn set_id(this: &RtcCodecStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcCodecStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcCodecStats, val: f64); + pub fn set_timestamp(this: &RtcCodecStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcCodecStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcCodecStats, val: RtcStatsType); + pub fn set_type(this: &RtcCodecStats, val: RtcStatsType); + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "channels")] + pub fn get_channels(this: &RtcCodecStats) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcCodecStats, val: u32); + pub fn set_channels(this: &RtcCodecStats, val: u32); + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "clockRate")] + pub fn get_clock_rate(this: &RtcCodecStats) -> Option; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcCodecStats, val: u32); + pub fn set_clock_rate(this: &RtcCodecStats, val: u32); + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "codec")] + pub fn get_codec(this: &RtcCodecStats) -> Option; + #[doc = "Change the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &RtcCodecStats, val: &str); + pub fn set_codec(this: &RtcCodecStats, val: &str); + #[doc = "Get the `parameters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "parameters")] + pub fn get_parameters(this: &RtcCodecStats) -> Option; + #[doc = "Change the `parameters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "parameters")] - fn parameters_shim(this: &RtcCodecStats, val: &str); + pub fn set_parameters(this: &RtcCodecStats, val: &str); + #[doc = "Get the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[wasm_bindgen(method, getter = "payloadType")] + pub fn get_payload_type(this: &RtcCodecStats) -> Option; + #[doc = "Change the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] #[wasm_bindgen(method, setter = "payloadType")] - fn payload_type_shim(this: &RtcCodecStats, val: u32); + pub fn set_payload_type(this: &RtcCodecStats, val: u32); } impl RtcCodecStats { #[doc = "Construct a new `RtcCodecStats`."] @@ -37,61 +102,45 @@ impl RtcCodecStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u32) -> &mut Self { - self.channels_shim(val); + self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate(val); self } - #[doc = "Change the `codec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_codec()` instead."] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec(val); self } - #[doc = "Change the `parameters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_parameters()` instead."] pub fn parameters(&mut self, val: &str) -> &mut Self { - self.parameters_shim(val); + self.set_parameters(val); self } - #[doc = "Change the `payloadType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + #[deprecated = "Use `set_payload_type()` instead."] pub fn payload_type(&mut self, val: u32) -> &mut Self { - self.payload_type_shim(val); + self.set_payload_type(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcConfiguration.rs b/crates/web-sys/src/features/gen_RtcConfiguration.rs index 9d73017a32e..93343f2b14b 100644 --- a/crates/web-sys/src/features/gen_RtcConfiguration.rs +++ b/crates/web-sys/src/features/gen_RtcConfiguration.rs @@ -11,17 +11,59 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] pub type RtcConfiguration; #[cfg(feature = "RtcBundlePolicy")] + #[doc = "Get the `bundlePolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] + #[wasm_bindgen(method, getter = "bundlePolicy")] + pub fn get_bundle_policy(this: &RtcConfiguration) -> Option; + #[cfg(feature = "RtcBundlePolicy")] + #[doc = "Change the `bundlePolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "bundlePolicy")] - fn bundle_policy_shim(this: &RtcConfiguration, val: RtcBundlePolicy); + pub fn set_bundle_policy(this: &RtcConfiguration, val: RtcBundlePolicy); + #[doc = "Get the `certificates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[wasm_bindgen(method, getter = "certificates")] + pub fn get_certificates(this: &RtcConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `certificates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "certificates")] - fn certificates_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_certificates(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `iceServers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[wasm_bindgen(method, getter = "iceServers")] + pub fn get_ice_servers(this: &RtcConfiguration) -> Option<::js_sys::Array>; + #[doc = "Change the `iceServers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "iceServers")] - fn ice_servers_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_ice_servers(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RtcIceTransportPolicy")] + #[doc = "Get the `iceTransportPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] + #[wasm_bindgen(method, getter = "iceTransportPolicy")] + pub fn get_ice_transport_policy(this: &RtcConfiguration) -> Option; + #[cfg(feature = "RtcIceTransportPolicy")] + #[doc = "Change the `iceTransportPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] #[wasm_bindgen(method, setter = "iceTransportPolicy")] - fn ice_transport_policy_shim(this: &RtcConfiguration, val: RtcIceTransportPolicy); + pub fn set_ice_transport_policy(this: &RtcConfiguration, val: RtcIceTransportPolicy); + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[wasm_bindgen(method, getter = "peerIdentity")] + pub fn get_peer_identity(this: &RtcConfiguration) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &RtcConfiguration, val: Option<&str>); + pub fn set_peer_identity(this: &RtcConfiguration, val: Option<&str>); } impl RtcConfiguration { #[doc = "Construct a new `RtcConfiguration`."] @@ -33,40 +75,30 @@ impl RtcConfiguration { ret } #[cfg(feature = "RtcBundlePolicy")] - #[doc = "Change the `bundlePolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] + #[deprecated = "Use `set_bundle_policy()` instead."] pub fn bundle_policy(&mut self, val: RtcBundlePolicy) -> &mut Self { - self.bundle_policy_shim(val); + self.set_bundle_policy(val); self } - #[doc = "Change the `certificates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_certificates()` instead."] pub fn certificates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.certificates_shim(val); + self.set_certificates(val); self } - #[doc = "Change the `iceServers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_ice_servers()` instead."] pub fn ice_servers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_servers_shim(val); + self.set_ice_servers(val); self } #[cfg(feature = "RtcIceTransportPolicy")] - #[doc = "Change the `iceTransportPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] + #[deprecated = "Use `set_ice_transport_policy()` instead."] pub fn ice_transport_policy(&mut self, val: RtcIceTransportPolicy) -> &mut Self { - self.ice_transport_policy_shim(val); + self.set_ice_transport_policy(val); self } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs index bf64ac7bcd1..9f798bbc70e 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] pub type RtcDataChannelEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcDataChannelEventInit, val: bool); + pub fn set_bubbles(this: &RtcDataChannelEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcDataChannelEventInit, val: bool); + pub fn set_cancelable(this: &RtcDataChannelEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &RtcDataChannelEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcDataChannelEventInit, val: bool); + pub fn set_composed(this: &RtcDataChannelEventInit, val: bool); #[cfg(feature = "RtcDataChannel")] + #[doc = "Get the `channel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] + #[wasm_bindgen(method, getter = "channel")] + pub fn get_channel(this: &RtcDataChannelEventInit) -> RtcDataChannel; + #[cfg(feature = "RtcDataChannel")] + #[doc = "Change the `channel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] #[wasm_bindgen(method, setter = "channel")] - fn channel_shim(this: &RtcDataChannelEventInit, val: &RtcDataChannel); + pub fn set_channel(this: &RtcDataChannelEventInit, val: &RtcDataChannel); } impl RtcDataChannelEventInit { #[cfg(feature = "RtcDataChannel")] @@ -31,33 +64,25 @@ impl RtcDataChannelEventInit { ret.channel(channel); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "RtcDataChannel")] - #[doc = "Change the `channel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] + #[deprecated = "Use `set_channel()` instead."] pub fn channel(&mut self, val: &RtcDataChannel) -> &mut Self { - self.channel_shim(val); + self.set_channel(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs index 915662ba9a1..1e3a9331a66 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs @@ -10,20 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub type RtcDataChannelInit; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcDataChannelInit, val: u16); + pub fn set_id(this: &RtcDataChannelInit, val: u16); + #[doc = "Get the `maxPacketLifeTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "maxPacketLifeTime")] + pub fn get_max_packet_life_time(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxPacketLifeTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxPacketLifeTime")] - fn max_packet_life_time_shim(this: &RtcDataChannelInit, val: u16); + pub fn set_max_packet_life_time(this: &RtcDataChannelInit, val: u16); + #[doc = "Get the `maxRetransmitTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "maxRetransmitTime")] + pub fn get_max_retransmit_time(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxRetransmitTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxRetransmitTime")] - fn max_retransmit_time_shim(this: &RtcDataChannelInit, val: u16); + pub fn set_max_retransmit_time(this: &RtcDataChannelInit, val: u16); + #[doc = "Get the `maxRetransmits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "maxRetransmits")] + pub fn get_max_retransmits(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `maxRetransmits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "maxRetransmits")] - fn max_retransmits_shim(this: &RtcDataChannelInit, val: u16); + pub fn set_max_retransmits(this: &RtcDataChannelInit, val: u16); + #[doc = "Get the `negotiated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "negotiated")] + pub fn get_negotiated(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `negotiated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "negotiated")] - fn negotiated_shim(this: &RtcDataChannelInit, val: bool); + pub fn set_negotiated(this: &RtcDataChannelInit, val: bool); + #[doc = "Get the `ordered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "ordered")] + pub fn get_ordered(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `ordered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "ordered")] - fn ordered_shim(this: &RtcDataChannelInit, val: bool); + pub fn set_ordered(this: &RtcDataChannelInit, val: bool); + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[wasm_bindgen(method, getter = "protocol")] + pub fn get_protocol(this: &RtcDataChannelInit) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcDataChannelInit, val: &str); + pub fn set_protocol(this: &RtcDataChannelInit, val: &str); } impl RtcDataChannelInit { #[doc = "Construct a new `RtcDataChannelInit`."] @@ -34,53 +90,39 @@ impl RtcDataChannelInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: u16) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `maxPacketLifeTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_packet_life_time()` instead."] pub fn max_packet_life_time(&mut self, val: u16) -> &mut Self { - self.max_packet_life_time_shim(val); + self.set_max_packet_life_time(val); self } - #[doc = "Change the `maxRetransmitTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_retransmit_time()` instead."] pub fn max_retransmit_time(&mut self, val: u16) -> &mut Self { - self.max_retransmit_time_shim(val); + self.set_max_retransmit_time(val); self } - #[doc = "Change the `maxRetransmits` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_max_retransmits()` instead."] pub fn max_retransmits(&mut self, val: u16) -> &mut Self { - self.max_retransmits_shim(val); + self.set_max_retransmits(val); self } - #[doc = "Change the `negotiated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_negotiated()` instead."] pub fn negotiated(&mut self, val: bool) -> &mut Self { - self.negotiated_shim(val); + self.set_negotiated(val); self } - #[doc = "Change the `ordered` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_ordered()` instead."] pub fn ordered(&mut self, val: bool) -> &mut Self { - self.ordered_shim(val); + self.set_ordered(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcFecParameters.rs b/crates/web-sys/src/features/gen_RtcFecParameters.rs index 4ac685bf15c..b72b25c9095 100644 --- a/crates/web-sys/src/features/gen_RtcFecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcFecParameters.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] pub type RtcFecParameters; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcFecParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcFecParameters, val: u32); + pub fn set_ssrc(this: &RtcFecParameters, val: u32); } impl RtcFecParameters { #[doc = "Construct a new `RtcFecParameters`."] @@ -22,11 +30,9 @@ impl RtcFecParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs index 9b4637f86a8..9268c3908da 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] pub type RtcIceCandidateInit; + #[doc = "Get the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[wasm_bindgen(method, getter = "candidate")] + pub fn get_candidate(this: &RtcIceCandidateInit) -> String; + #[doc = "Change the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "candidate")] - fn candidate_shim(this: &RtcIceCandidateInit, val: &str); + pub fn set_candidate(this: &RtcIceCandidateInit, val: &str); + #[doc = "Get the `sdpMLineIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[wasm_bindgen(method, getter = "sdpMLineIndex")] + pub fn get_sdp_m_line_index(this: &RtcIceCandidateInit) -> Option; + #[doc = "Change the `sdpMLineIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "sdpMLineIndex")] - fn sdp_m_line_index_shim(this: &RtcIceCandidateInit, val: Option); + pub fn set_sdp_m_line_index(this: &RtcIceCandidateInit, val: Option); + #[doc = "Get the `sdpMid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[wasm_bindgen(method, getter = "sdpMid")] + pub fn get_sdp_mid(this: &RtcIceCandidateInit) -> Option; + #[doc = "Change the `sdpMid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] #[wasm_bindgen(method, setter = "sdpMid")] - fn sdp_mid_shim(this: &RtcIceCandidateInit, val: Option<&str>); + pub fn set_sdp_mid(this: &RtcIceCandidateInit, val: Option<&str>); } impl RtcIceCandidateInit { #[doc = "Construct a new `RtcIceCandidateInit`."] @@ -27,25 +51,19 @@ impl RtcIceCandidateInit { ret.candidate(candidate); ret } - #[doc = "Change the `candidate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_candidate()` instead."] pub fn candidate(&mut self, val: &str) -> &mut Self { - self.candidate_shim(val); + self.set_candidate(val); self } - #[doc = "Change the `sdpMLineIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_sdp_m_line_index()` instead."] pub fn sdp_m_line_index(&mut self, val: Option) -> &mut Self { - self.sdp_m_line_index_shim(val); + self.set_sdp_m_line_index(val); self } - #[doc = "Change the `sdpMid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + #[deprecated = "Use `set_sdp_mid()` instead."] pub fn sdp_mid(&mut self, val: Option<&str>) -> &mut Self { - self.sdp_mid_shim(val); + self.set_sdp_mid(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs index d2a83611f77..0ea8f977a5e 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs @@ -10,42 +10,180 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub type RtcIceCandidatePairStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_id(this: &RtcIceCandidatePairStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_timestamp(this: &RtcIceCandidatePairStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcIceCandidatePairStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceCandidatePairStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceCandidatePairStats, val: RtcStatsType); + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_bytes_received(this: &RtcIceCandidatePairStats, val: f64); + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_bytes_sent(this: &RtcIceCandidatePairStats, val: f64); + #[doc = "Get the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "componentId")] + pub fn get_component_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "componentId")] - fn component_id_shim(this: &RtcIceCandidatePairStats, val: u32); + pub fn set_component_id(this: &RtcIceCandidatePairStats, val: u32); + #[doc = "Get the `lastPacketReceivedTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "lastPacketReceivedTimestamp")] + pub fn get_last_packet_received_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "lastPacketReceivedTimestamp")] - fn last_packet_received_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_last_packet_received_timestamp(this: &RtcIceCandidatePairStats, val: f64); + #[doc = "Get the `lastPacketSentTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "lastPacketSentTimestamp")] + pub fn get_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `lastPacketSentTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "lastPacketSentTimestamp")] - fn last_packet_sent_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats, val: f64); + #[doc = "Get the `localCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "localCandidateId")] + pub fn get_local_candidate_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `localCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "localCandidateId")] - fn local_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_local_candidate_id(this: &RtcIceCandidatePairStats, val: &str); + #[doc = "Get the `nominated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "nominated")] + pub fn get_nominated(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `nominated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "nominated")] - fn nominated_shim(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_nominated(this: &RtcIceCandidatePairStats, val: bool); + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "priority")] + pub fn get_priority(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &RtcIceCandidatePairStats, val: f64); + pub fn set_priority(this: &RtcIceCandidatePairStats, val: f64); + #[doc = "Get the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "readable")] + pub fn get_readable(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "readable")] - fn readable_shim(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_readable(this: &RtcIceCandidatePairStats, val: bool); + #[doc = "Get the `remoteCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "remoteCandidateId")] + pub fn get_remote_candidate_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `remoteCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "remoteCandidateId")] - fn remote_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_remote_candidate_id(this: &RtcIceCandidatePairStats, val: &str); + #[doc = "Get the `selected` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "selected")] + pub fn get_selected(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `selected` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "selected")] - fn selected_shim(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_selected(this: &RtcIceCandidatePairStats, val: bool); + #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] + #[wasm_bindgen(method, getter = "state")] + pub fn get_state(this: &RtcIceCandidatePairStats) -> Option; #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); + pub fn set_state(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "transportId")] + pub fn get_transport_id(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcIceCandidatePairStats, val: &str); + pub fn set_transport_id(this: &RtcIceCandidatePairStats, val: &str); + #[doc = "Get the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[wasm_bindgen(method, getter = "writable")] + pub fn get_writable(this: &RtcIceCandidatePairStats) -> Option; + #[doc = "Change the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] #[wasm_bindgen(method, setter = "writable")] - fn writable_shim(this: &RtcIceCandidatePairStats, val: bool); + pub fn set_writable(this: &RtcIceCandidatePairStats, val: bool); } impl RtcIceCandidatePairStats { #[doc = "Construct a new `RtcIceCandidatePairStats`."] @@ -56,125 +194,91 @@ impl RtcIceCandidatePairStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent(val); self } - #[doc = "Change the `componentId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_component_id()` instead."] pub fn component_id(&mut self, val: u32) -> &mut Self { - self.component_id_shim(val); + self.set_component_id(val); self } - #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_last_packet_received_timestamp()` instead."] pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self { - self.last_packet_received_timestamp_shim(val); + self.set_last_packet_received_timestamp(val); self } - #[doc = "Change the `lastPacketSentTimestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_last_packet_sent_timestamp()` instead."] pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self { - self.last_packet_sent_timestamp_shim(val); + self.set_last_packet_sent_timestamp(val); self } - #[doc = "Change the `localCandidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_local_candidate_id()` instead."] pub fn local_candidate_id(&mut self, val: &str) -> &mut Self { - self.local_candidate_id_shim(val); + self.set_local_candidate_id(val); self } - #[doc = "Change the `nominated` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_nominated()` instead."] pub fn nominated(&mut self, val: bool) -> &mut Self { - self.nominated_shim(val); + self.set_nominated(val); self } - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: f64) -> &mut Self { - self.priority_shim(val); + self.set_priority(val); self } - #[doc = "Change the `readable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_readable()` instead."] pub fn readable(&mut self, val: bool) -> &mut Self { - self.readable_shim(val); + self.set_readable(val); self } - #[doc = "Change the `remoteCandidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_remote_candidate_id()` instead."] pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self { - self.remote_candidate_id_shim(val); + self.set_remote_candidate_id(val); self } - #[doc = "Change the `selected` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_selected()` instead."] pub fn selected(&mut self, val: bool) -> &mut Self { - self.selected_shim(val); + self.set_selected(val); self } #[cfg(feature = "RtcStatsIceCandidatePairState")] - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self { - self.state_shim(val); + self.set_state(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id(val); self } - #[doc = "Change the `writable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + #[deprecated = "Use `set_writable()` instead."] pub fn writable(&mut self, val: bool) -> &mut Self { - self.writable_shim(val); + self.set_writable(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs index 1b0e279c135..6ea9e9880b2 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs @@ -10,26 +10,100 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub type RtcIceCandidateStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceCandidateStats, val: &str); + pub fn set_id(this: &RtcIceCandidateStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceCandidateStats, val: f64); + pub fn set_timestamp(this: &RtcIceCandidateStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcIceCandidateStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceCandidateStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceCandidateStats, val: RtcStatsType); + #[doc = "Get the `candidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "candidateId")] + pub fn get_candidate_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `candidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "candidateId")] - fn candidate_id_shim(this: &RtcIceCandidateStats, val: &str); + pub fn set_candidate_id(this: &RtcIceCandidateStats, val: &str); + #[cfg(feature = "RtcStatsIceCandidateType")] + #[doc = "Get the `candidateType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] + #[wasm_bindgen(method, getter = "candidateType")] + pub fn get_candidate_type(this: &RtcIceCandidateStats) -> Option; #[cfg(feature = "RtcStatsIceCandidateType")] + #[doc = "Change the `candidateType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] #[wasm_bindgen(method, setter = "candidateType")] - fn candidate_type_shim(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); + pub fn set_candidate_type(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); + #[doc = "Get the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "componentId")] + pub fn get_component_id(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "componentId")] - fn component_id_shim(this: &RtcIceCandidateStats, val: &str); + pub fn set_component_id(this: &RtcIceCandidateStats, val: &str); + #[doc = "Get the `ipAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "ipAddress")] + pub fn get_ip_address(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `ipAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "ipAddress")] - fn ip_address_shim(this: &RtcIceCandidateStats, val: &str); + pub fn set_ip_address(this: &RtcIceCandidateStats, val: &str); + #[doc = "Get the `portNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "portNumber")] + pub fn get_port_number(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `portNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "portNumber")] - fn port_number_shim(this: &RtcIceCandidateStats, val: i32); + pub fn set_port_number(this: &RtcIceCandidateStats, val: i32); + #[doc = "Get the `transport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[wasm_bindgen(method, getter = "transport")] + pub fn get_transport(this: &RtcIceCandidateStats) -> Option; + #[doc = "Change the `transport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] #[wasm_bindgen(method, setter = "transport")] - fn transport_shim(this: &RtcIceCandidateStats, val: &str); + pub fn set_transport(this: &RtcIceCandidateStats, val: &str); } impl RtcIceCandidateStats { #[doc = "Construct a new `RtcIceCandidateStats`."] @@ -40,69 +114,51 @@ impl RtcIceCandidateStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `candidateId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_candidate_id()` instead."] pub fn candidate_id(&mut self, val: &str) -> &mut Self { - self.candidate_id_shim(val); + self.set_candidate_id(val); self } #[cfg(feature = "RtcStatsIceCandidateType")] - #[doc = "Change the `candidateType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] + #[deprecated = "Use `set_candidate_type()` instead."] pub fn candidate_type(&mut self, val: RtcStatsIceCandidateType) -> &mut Self { - self.candidate_type_shim(val); + self.set_candidate_type(val); self } - #[doc = "Change the `componentId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_component_id()` instead."] pub fn component_id(&mut self, val: &str) -> &mut Self { - self.component_id_shim(val); + self.set_component_id(val); self } - #[doc = "Change the `ipAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_ip_address()` instead."] pub fn ip_address(&mut self, val: &str) -> &mut Self { - self.ip_address_shim(val); + self.set_ip_address(val); self } - #[doc = "Change the `portNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_port_number()` instead."] pub fn port_number(&mut self, val: i32) -> &mut Self { - self.port_number_shim(val); + self.set_port_number(val); self } - #[doc = "Change the `transport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + #[deprecated = "Use `set_transport()` instead."] pub fn transport(&mut self, val: &str) -> &mut Self { - self.transport_shim(val); + self.set_transport(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs index b9d84119d9d..ffdf6a5ec07 100644 --- a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs @@ -10,23 +10,88 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub type RtcIceComponentStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceComponentStats, val: &str); + pub fn set_id(this: &RtcIceComponentStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceComponentStats, val: f64); + pub fn set_timestamp(this: &RtcIceComponentStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcIceComponentStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceComponentStats, val: RtcStatsType); + pub fn set_type(this: &RtcIceComponentStats, val: RtcStatsType); + #[doc = "Get the `activeConnection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "activeConnection")] + pub fn get_active_connection(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `activeConnection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "activeConnection")] - fn active_connection_shim(this: &RtcIceComponentStats, val: bool); + pub fn set_active_connection(this: &RtcIceComponentStats, val: bool); + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcIceComponentStats, val: u32); + pub fn set_bytes_received(this: &RtcIceComponentStats, val: u32); + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcIceComponentStats, val: u32); + pub fn set_bytes_sent(this: &RtcIceComponentStats, val: u32); + #[doc = "Get the `component` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "component")] + pub fn get_component(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `component` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "component")] - fn component_shim(this: &RtcIceComponentStats, val: i32); + pub fn set_component(this: &RtcIceComponentStats, val: i32); + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[wasm_bindgen(method, getter = "transportId")] + pub fn get_transport_id(this: &RtcIceComponentStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcIceComponentStats, val: &str); + pub fn set_transport_id(this: &RtcIceComponentStats, val: &str); } impl RtcIceComponentStats { #[doc = "Construct a new `RtcIceComponentStats`."] @@ -37,61 +102,45 @@ impl RtcIceComponentStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `activeConnection` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_active_connection()` instead."] pub fn active_connection(&mut self, val: bool) -> &mut Self { - self.active_connection_shim(val); + self.set_active_connection(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: u32) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent(val); self } - #[doc = "Change the `component` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_component()` instead."] pub fn component(&mut self, val: i32) -> &mut Self { - self.component_shim(val); + self.set_component(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceServer.rs b/crates/web-sys/src/features/gen_RtcIceServer.rs index 23937c63109..9d68913411a 100644 --- a/crates/web-sys/src/features/gen_RtcIceServer.rs +++ b/crates/web-sys/src/features/gen_RtcIceServer.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub type RtcIceServer; + #[doc = "Get the `credential` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[wasm_bindgen(method, getter = "credential")] + pub fn get_credential(this: &RtcIceServer) -> Option; + #[doc = "Change the `credential` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "credential")] - fn credential_shim(this: &RtcIceServer, val: &str); + pub fn set_credential(this: &RtcIceServer, val: &str); #[cfg(feature = "RtcIceCredentialType")] + #[doc = "Get the `credentialType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] + #[wasm_bindgen(method, getter = "credentialType")] + pub fn get_credential_type(this: &RtcIceServer) -> Option; + #[cfg(feature = "RtcIceCredentialType")] + #[doc = "Change the `credentialType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] #[wasm_bindgen(method, setter = "credentialType")] - fn credential_type_shim(this: &RtcIceServer, val: RtcIceCredentialType); + pub fn set_credential_type(this: &RtcIceServer, val: RtcIceCredentialType); + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &RtcIceServer) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &RtcIceServer, val: &str); + pub fn set_url(this: &RtcIceServer, val: &str); + #[doc = "Get the `urls` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[wasm_bindgen(method, getter = "urls")] + pub fn get_urls(this: &RtcIceServer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `urls` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "urls")] - fn urls_shim(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); + pub fn set_urls(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `username` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[wasm_bindgen(method, getter = "username")] + pub fn get_username(this: &RtcIceServer) -> Option; + #[doc = "Change the `username` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] #[wasm_bindgen(method, setter = "username")] - fn username_shim(this: &RtcIceServer, val: &str); + pub fn set_username(this: &RtcIceServer, val: &str); } impl RtcIceServer { #[doc = "Construct a new `RtcIceServer`."] @@ -31,40 +72,30 @@ impl RtcIceServer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `credential` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_credential()` instead."] pub fn credential(&mut self, val: &str) -> &mut Self { - self.credential_shim(val); + self.set_credential(val); self } #[cfg(feature = "RtcIceCredentialType")] - #[doc = "Change the `credentialType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] + #[deprecated = "Use `set_credential_type()` instead."] pub fn credential_type(&mut self, val: RtcIceCredentialType) -> &mut Self { - self.credential_type_shim(val); + self.set_credential_type(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } - #[doc = "Change the `urls` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_urls()` instead."] pub fn urls(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.urls_shim(val); + self.set_urls(val); self } - #[doc = "Change the `username` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + #[deprecated = "Use `set_username()` instead."] pub fn username(&mut self, val: &str) -> &mut Self { - self.username_shim(val); + self.set_username(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs index 03e7922f9fc..7458c2702a8 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] pub type RtcIdentityAssertion; + #[doc = "Get the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[wasm_bindgen(method, getter = "idp")] + pub fn get_idp(this: &RtcIdentityAssertion) -> Option; + #[doc = "Change the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, setter = "idp")] - fn idp_shim(this: &RtcIdentityAssertion, val: &str); + pub fn set_idp(this: &RtcIdentityAssertion, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &RtcIdentityAssertion) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RtcIdentityAssertion, val: &str); + pub fn set_name(this: &RtcIdentityAssertion, val: &str); } impl RtcIdentityAssertion { #[doc = "Construct a new `RtcIdentityAssertion`."] @@ -24,18 +40,14 @@ impl RtcIdentityAssertion { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `idp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[deprecated = "Use `set_idp()` instead."] pub fn idp(&mut self, val: &str) -> &mut Self { - self.idp_shim(val); + self.set_idp(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs index 186af70aded..8a7503430a2 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] pub type RtcIdentityAssertionResult; + #[doc = "Get the `assertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] + #[wasm_bindgen(method, getter = "assertion")] + pub fn get_assertion(this: &RtcIdentityAssertionResult) -> String; + #[doc = "Change the `assertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] #[wasm_bindgen(method, setter = "assertion")] - fn assertion_shim(this: &RtcIdentityAssertionResult, val: &str); + pub fn set_assertion(this: &RtcIdentityAssertionResult, val: &str); #[cfg(feature = "RtcIdentityProviderDetails")] + #[doc = "Get the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] + #[wasm_bindgen(method, getter = "idp")] + pub fn get_idp(this: &RtcIdentityAssertionResult) -> RtcIdentityProviderDetails; + #[cfg(feature = "RtcIdentityProviderDetails")] + #[doc = "Change the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "idp")] - fn idp_shim(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); + pub fn set_idp(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); } impl RtcIdentityAssertionResult { #[cfg(feature = "RtcIdentityProviderDetails")] @@ -28,19 +45,15 @@ impl RtcIdentityAssertionResult { ret.idp(idp); ret } - #[doc = "Change the `assertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] + #[deprecated = "Use `set_assertion()` instead."] pub fn assertion(&mut self, val: &str) -> &mut Self { - self.assertion_shim(val); + self.set_assertion(val); self } #[cfg(feature = "RtcIdentityProviderDetails")] - #[doc = "Change the `idp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_idp()` instead."] pub fn idp(&mut self, val: &RtcIdentityProviderDetails) -> &mut Self { - self.idp_shim(val); + self.set_idp(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs index b2d6b76b5b0..2b3fe976406 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] pub type RtcIdentityProvider; + #[doc = "Get the `generateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[wasm_bindgen(method, getter = "generateAssertion")] + pub fn get_generate_assertion(this: &RtcIdentityProvider) -> ::js_sys::Function; + #[doc = "Change the `generateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, setter = "generateAssertion")] - fn generate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); + pub fn set_generate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); + #[doc = "Get the `validateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[wasm_bindgen(method, getter = "validateAssertion")] + pub fn get_validate_assertion(this: &RtcIdentityProvider) -> ::js_sys::Function; + #[doc = "Change the `validateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] #[wasm_bindgen(method, setter = "validateAssertion")] - fn validate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); + pub fn set_validate_assertion(this: &RtcIdentityProvider, val: &::js_sys::Function); } impl RtcIdentityProvider { #[doc = "Construct a new `RtcIdentityProvider`."] @@ -29,18 +45,14 @@ impl RtcIdentityProvider { ret.validate_assertion(validate_assertion); ret } - #[doc = "Change the `generateAssertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[deprecated = "Use `set_generate_assertion()` instead."] pub fn generate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { - self.generate_assertion_shim(val); + self.set_generate_assertion(val); self } - #[doc = "Change the `validateAssertion` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + #[deprecated = "Use `set_validate_assertion()` instead."] pub fn validate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { - self.validate_assertion_shim(val); + self.set_validate_assertion(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs index 948c99eabda..e00b757903b 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] pub type RtcIdentityProviderDetails; + #[doc = "Get the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[wasm_bindgen(method, getter = "domain")] + pub fn get_domain(this: &RtcIdentityProviderDetails) -> String; + #[doc = "Change the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "domain")] - fn domain_shim(this: &RtcIdentityProviderDetails, val: &str); + pub fn set_domain(this: &RtcIdentityProviderDetails, val: &str); + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[wasm_bindgen(method, getter = "protocol")] + pub fn get_protocol(this: &RtcIdentityProviderDetails) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcIdentityProviderDetails, val: &str); + pub fn set_protocol(this: &RtcIdentityProviderDetails, val: &str); } impl RtcIdentityProviderDetails { #[doc = "Construct a new `RtcIdentityProviderDetails`."] @@ -25,18 +41,14 @@ impl RtcIdentityProviderDetails { ret.domain(domain); ret } - #[doc = "Change the `domain` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_domain()` instead."] pub fn domain(&mut self, val: &str) -> &mut Self { - self.domain_shim(val); + self.set_domain(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs index b4ee75df20c..2dc6811ef44 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] pub type RtcIdentityProviderOptions; + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[wasm_bindgen(method, getter = "peerIdentity")] + pub fn get_peer_identity(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_peer_identity(this: &RtcIdentityProviderOptions, val: &str); + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[wasm_bindgen(method, getter = "protocol")] + pub fn get_protocol(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_protocol(this: &RtcIdentityProviderOptions, val: &str); + #[doc = "Get the `usernameHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[wasm_bindgen(method, getter = "usernameHint")] + pub fn get_username_hint(this: &RtcIdentityProviderOptions) -> Option; + #[doc = "Change the `usernameHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] #[wasm_bindgen(method, setter = "usernameHint")] - fn username_hint_shim(this: &RtcIdentityProviderOptions, val: &str); + pub fn set_username_hint(this: &RtcIdentityProviderOptions, val: &str); } impl RtcIdentityProviderOptions { #[doc = "Construct a new `RtcIdentityProviderOptions`."] @@ -26,25 +50,19 @@ impl RtcIdentityProviderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `peerIdentity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_peer_identity()` instead."] pub fn peer_identity(&mut self, val: &str) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity(val); self } - #[doc = "Change the `protocol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_protocol()` instead."] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol(val); self } - #[doc = "Change the `usernameHint` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + #[deprecated = "Use `set_username_hint()` instead."] pub fn username_hint(&mut self, val: &str) -> &mut Self { - self.username_hint_shim(val); + self.set_username_hint(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs index 3c86139a6e4..fd417af730f 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] pub type RtcIdentityValidationResult; + #[doc = "Get the `contents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[wasm_bindgen(method, getter = "contents")] + pub fn get_contents(this: &RtcIdentityValidationResult) -> String; + #[doc = "Change the `contents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, setter = "contents")] - fn contents_shim(this: &RtcIdentityValidationResult, val: &str); + pub fn set_contents(this: &RtcIdentityValidationResult, val: &str); + #[doc = "Get the `identity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[wasm_bindgen(method, getter = "identity")] + pub fn get_identity(this: &RtcIdentityValidationResult) -> String; + #[doc = "Change the `identity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] #[wasm_bindgen(method, setter = "identity")] - fn identity_shim(this: &RtcIdentityValidationResult, val: &str); + pub fn set_identity(this: &RtcIdentityValidationResult, val: &str); } impl RtcIdentityValidationResult { #[doc = "Construct a new `RtcIdentityValidationResult`."] @@ -26,18 +42,14 @@ impl RtcIdentityValidationResult { ret.identity(identity); ret } - #[doc = "Change the `contents` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[deprecated = "Use `set_contents()` instead."] pub fn contents(&mut self, val: &str) -> &mut Self { - self.contents_shim(val); + self.set_contents(val); self } - #[doc = "Change the `identity` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + #[deprecated = "Use `set_identity()` instead."] pub fn identity(&mut self, val: &str) -> &mut Self { - self.identity_shim(val); + self.set_identity(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs index 4d8ff7ecc6c..21580dcb493 100644 --- a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs @@ -10,55 +10,248 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub type RtcInboundRtpStreamStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_id(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcInboundRtpStreamStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcInboundRtpStreamStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcInboundRtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcInboundRtpStreamStats, val: RtcStatsType); + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateMean")] + pub fn get_bitrate_mean(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateStdDev")] + pub fn get_bitrate_std_dev(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "codecId")] + pub fn get_codec_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "firCount")] + pub fn get_fir_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateMean")] + pub fn get_framerate_mean(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateStdDev")] + pub fn get_framerate_std_dev(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "isRemote")] + pub fn get_is_remote(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcInboundRtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcInboundRtpStreamStats, val: bool); + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaTrackId")] + pub fn get_media_track_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaType")] + pub fn get_media_type(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "nackCount")] + pub fn get_nack_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "pliCount")] + pub fn get_pli_count(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "remoteId")] + pub fn get_remote_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "transportId")] + pub fn get_transport_id(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcInboundRtpStreamStats, val: &str); + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_bytes_received(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `discardedPackets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "discardedPackets")] + pub fn get_discarded_packets(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `discardedPackets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "discardedPackets")] - fn discarded_packets_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_discarded_packets(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framesDecoded")] + pub fn get_frames_decoded(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framesDecoded")] - fn frames_decoded_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_frames_decoded(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `jitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "jitter")] + pub fn get_jitter(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `jitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "jitter")] - fn jitter_shim(this: &RtcInboundRtpStreamStats, val: f64); + pub fn set_jitter(this: &RtcInboundRtpStreamStats, val: f64); + #[doc = "Get the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "packetsLost")] + pub fn get_packets_lost(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsLost")] - fn packets_lost_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_packets_lost(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "packetsReceived")] + pub fn get_packets_received(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsReceived")] - fn packets_received_shim(this: &RtcInboundRtpStreamStats, val: u32); + pub fn set_packets_received(this: &RtcInboundRtpStreamStats, val: u32); + #[doc = "Get the `roundTripTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "roundTripTime")] + pub fn get_round_trip_time(this: &RtcInboundRtpStreamStats) -> Option; + #[doc = "Change the `roundTripTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "roundTripTime")] - fn round_trip_time_shim(this: &RtcInboundRtpStreamStats, val: i32); + pub fn set_round_trip_time(this: &RtcInboundRtpStreamStats, val: i32); } impl RtcInboundRtpStreamStats { #[doc = "Construct a new `RtcInboundRtpStreamStats`."] @@ -69,173 +262,125 @@ impl RtcInboundRtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received(val); self } - #[doc = "Change the `discardedPackets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_discarded_packets()` instead."] pub fn discarded_packets(&mut self, val: u32) -> &mut Self { - self.discarded_packets_shim(val); + self.set_discarded_packets(val); self } - #[doc = "Change the `framesDecoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_frames_decoded()` instead."] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { - self.frames_decoded_shim(val); + self.set_frames_decoded(val); self } - #[doc = "Change the `jitter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_jitter()` instead."] pub fn jitter(&mut self, val: f64) -> &mut Self { - self.jitter_shim(val); + self.set_jitter(val); self } - #[doc = "Change the `packetsLost` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_lost()` instead."] pub fn packets_lost(&mut self, val: u32) -> &mut Self { - self.packets_lost_shim(val); + self.set_packets_lost(val); self } - #[doc = "Change the `packetsReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_received()` instead."] pub fn packets_received(&mut self, val: u32) -> &mut Self { - self.packets_received_shim(val); + self.set_packets_received(val); self } - #[doc = "Change the `roundTripTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + #[deprecated = "Use `set_round_trip_time()` instead."] pub fn round_trip_time(&mut self, val: i32) -> &mut Self { - self.round_trip_time_shim(val); + self.set_round_trip_time(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs index 3ee36c181b7..8dc44254a10 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub type RtcMediaStreamStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcMediaStreamStats, val: &str); + pub fn set_id(this: &RtcMediaStreamStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcMediaStreamStats, val: f64); + pub fn set_timestamp(this: &RtcMediaStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcMediaStreamStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcMediaStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcMediaStreamStats, val: RtcStatsType); + #[doc = "Get the `streamIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[wasm_bindgen(method, getter = "streamIdentifier")] + pub fn get_stream_identifier(this: &RtcMediaStreamStats) -> Option; + #[doc = "Change the `streamIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "streamIdentifier")] - fn stream_identifier_shim(this: &RtcMediaStreamStats, val: &str); + pub fn set_stream_identifier(this: &RtcMediaStreamStats, val: &str); + #[doc = "Get the `trackIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[wasm_bindgen(method, getter = "trackIds")] + pub fn get_track_ids(this: &RtcMediaStreamStats) -> Option<::js_sys::Array>; + #[doc = "Change the `trackIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] #[wasm_bindgen(method, setter = "trackIds")] - fn track_ids_shim(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); + pub fn set_track_ids(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); } impl RtcMediaStreamStats { #[doc = "Construct a new `RtcMediaStreamStats`."] @@ -31,40 +72,30 @@ impl RtcMediaStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `streamIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_stream_identifier()` instead."] pub fn stream_identifier(&mut self, val: &str) -> &mut Self { - self.stream_identifier_shim(val); + self.set_stream_identifier(val); self } - #[doc = "Change the `trackIds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + #[deprecated = "Use `set_track_ids()` instead."] pub fn track_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.track_ids_shim(val); + self.set_track_ids(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs index 81b5fd0deda..0ba64d2a16b 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs @@ -10,41 +10,178 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub type RtcMediaStreamTrackStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcMediaStreamTrackStats, val: &str); + pub fn set_id(this: &RtcMediaStreamTrackStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_timestamp(this: &RtcMediaStreamTrackStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcMediaStreamTrackStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcMediaStreamTrackStats, val: RtcStatsType); + pub fn set_type(this: &RtcMediaStreamTrackStats, val: RtcStatsType); + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "audioLevel")] + pub fn get_audio_level(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_audio_level(this: &RtcMediaStreamTrackStats, val: f64); + #[doc = "Get the `echoReturnLoss` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "echoReturnLoss")] + pub fn get_echo_return_loss(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `echoReturnLoss` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "echoReturnLoss")] - fn echo_return_loss_shim(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_echo_return_loss(this: &RtcMediaStreamTrackStats, val: f64); + #[doc = "Get the `echoReturnLossEnhancement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "echoReturnLossEnhancement")] + pub fn get_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `echoReturnLossEnhancement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "echoReturnLossEnhancement")] - fn echo_return_loss_enhancement_shim(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats, val: f64); + #[doc = "Get the `frameHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "frameHeight")] + pub fn get_frame_height(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `frameHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "frameHeight")] - fn frame_height_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frame_height(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `frameWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "frameWidth")] + pub fn get_frame_width(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `frameWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "frameWidth")] - fn frame_width_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frame_width(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `framesCorrupted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesCorrupted")] + pub fn get_frames_corrupted(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesCorrupted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesCorrupted")] - fn frames_corrupted_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_corrupted(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesDecoded")] + pub fn get_frames_decoded(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesDecoded")] - fn frames_decoded_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_decoded(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `framesDropped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesDropped")] + pub fn get_frames_dropped(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesDropped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesDropped")] - fn frames_dropped_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_dropped(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `framesPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesPerSecond")] + pub fn get_frames_per_second(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesPerSecond")] - fn frames_per_second_shim(this: &RtcMediaStreamTrackStats, val: f64); + pub fn set_frames_per_second(this: &RtcMediaStreamTrackStats, val: f64); + #[doc = "Get the `framesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesReceived")] + pub fn get_frames_received(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesReceived")] - fn frames_received_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_received(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `framesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "framesSent")] + pub fn get_frames_sent(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `framesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "framesSent")] - fn frames_sent_shim(this: &RtcMediaStreamTrackStats, val: u32); + pub fn set_frames_sent(this: &RtcMediaStreamTrackStats, val: u32); + #[doc = "Get the `remoteSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "remoteSource")] + pub fn get_remote_source(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `remoteSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "remoteSource")] - fn remote_source_shim(this: &RtcMediaStreamTrackStats, val: bool); + pub fn set_remote_source(this: &RtcMediaStreamTrackStats, val: bool); + #[doc = "Get the `ssrcIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "ssrcIds")] + pub fn get_ssrc_ids(this: &RtcMediaStreamTrackStats) -> Option<::js_sys::Array>; + #[doc = "Change the `ssrcIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "ssrcIds")] - fn ssrc_ids_shim(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); + pub fn set_ssrc_ids(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `trackIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[wasm_bindgen(method, getter = "trackIdentifier")] + pub fn get_track_identifier(this: &RtcMediaStreamTrackStats) -> Option; + #[doc = "Change the `trackIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] #[wasm_bindgen(method, setter = "trackIdentifier")] - fn track_identifier_shim(this: &RtcMediaStreamTrackStats, val: &str); + pub fn set_track_identifier(this: &RtcMediaStreamTrackStats, val: &str); } impl RtcMediaStreamTrackStats { #[doc = "Construct a new `RtcMediaStreamTrackStats`."] @@ -55,124 +192,90 @@ impl RtcMediaStreamTrackStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level(val); self } - #[doc = "Change the `echoReturnLoss` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_echo_return_loss()` instead."] pub fn echo_return_loss(&mut self, val: f64) -> &mut Self { - self.echo_return_loss_shim(val); + self.set_echo_return_loss(val); self } - #[doc = "Change the `echoReturnLossEnhancement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_echo_return_loss_enhancement()` instead."] pub fn echo_return_loss_enhancement(&mut self, val: f64) -> &mut Self { - self.echo_return_loss_enhancement_shim(val); + self.set_echo_return_loss_enhancement(val); self } - #[doc = "Change the `frameHeight` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frame_height()` instead."] pub fn frame_height(&mut self, val: u32) -> &mut Self { - self.frame_height_shim(val); + self.set_frame_height(val); self } - #[doc = "Change the `frameWidth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frame_width()` instead."] pub fn frame_width(&mut self, val: u32) -> &mut Self { - self.frame_width_shim(val); + self.set_frame_width(val); self } - #[doc = "Change the `framesCorrupted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_corrupted()` instead."] pub fn frames_corrupted(&mut self, val: u32) -> &mut Self { - self.frames_corrupted_shim(val); + self.set_frames_corrupted(val); self } - #[doc = "Change the `framesDecoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_decoded()` instead."] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { - self.frames_decoded_shim(val); + self.set_frames_decoded(val); self } - #[doc = "Change the `framesDropped` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_dropped()` instead."] pub fn frames_dropped(&mut self, val: u32) -> &mut Self { - self.frames_dropped_shim(val); + self.set_frames_dropped(val); self } - #[doc = "Change the `framesPerSecond` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_per_second()` instead."] pub fn frames_per_second(&mut self, val: f64) -> &mut Self { - self.frames_per_second_shim(val); + self.set_frames_per_second(val); self } - #[doc = "Change the `framesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_received()` instead."] pub fn frames_received(&mut self, val: u32) -> &mut Self { - self.frames_received_shim(val); + self.set_frames_received(val); self } - #[doc = "Change the `framesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_frames_sent()` instead."] pub fn frames_sent(&mut self, val: u32) -> &mut Self { - self.frames_sent_shim(val); + self.set_frames_sent(val); self } - #[doc = "Change the `remoteSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_remote_source()` instead."] pub fn remote_source(&mut self, val: bool) -> &mut Self { - self.remote_source_shim(val); + self.set_remote_source(val); self } - #[doc = "Change the `ssrcIds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_ssrc_ids()` instead."] pub fn ssrc_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ssrc_ids_shim(val); + self.set_ssrc_ids(val); self } - #[doc = "Change the `trackIdentifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + #[deprecated = "Use `set_track_identifier()` instead."] pub fn track_identifier(&mut self, val: &str) -> &mut Self { - self.track_identifier_shim(val); + self.set_track_identifier(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcOfferOptions.rs b/crates/web-sys/src/features/gen_RtcOfferOptions.rs index 11082e23695..ba2db197fcb 100644 --- a/crates/web-sys/src/features/gen_RtcOfferOptions.rs +++ b/crates/web-sys/src/features/gen_RtcOfferOptions.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] pub type RtcOfferOptions; + #[doc = "Get the `iceRestart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[wasm_bindgen(method, getter = "iceRestart")] + pub fn get_ice_restart(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `iceRestart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "iceRestart")] - fn ice_restart_shim(this: &RtcOfferOptions, val: bool); + pub fn set_ice_restart(this: &RtcOfferOptions, val: bool); + #[doc = "Get the `offerToReceiveAudio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[wasm_bindgen(method, getter = "offerToReceiveAudio")] + pub fn get_offer_to_receive_audio(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `offerToReceiveAudio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "offerToReceiveAudio")] - fn offer_to_receive_audio_shim(this: &RtcOfferOptions, val: bool); + pub fn set_offer_to_receive_audio(this: &RtcOfferOptions, val: bool); + #[doc = "Get the `offerToReceiveVideo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[wasm_bindgen(method, getter = "offerToReceiveVideo")] + pub fn get_offer_to_receive_video(this: &RtcOfferOptions) -> Option; + #[doc = "Change the `offerToReceiveVideo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] #[wasm_bindgen(method, setter = "offerToReceiveVideo")] - fn offer_to_receive_video_shim(this: &RtcOfferOptions, val: bool); + pub fn set_offer_to_receive_video(this: &RtcOfferOptions, val: bool); } impl RtcOfferOptions { #[doc = "Construct a new `RtcOfferOptions`."] @@ -26,25 +50,19 @@ impl RtcOfferOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `iceRestart` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_ice_restart()` instead."] pub fn ice_restart(&mut self, val: bool) -> &mut Self { - self.ice_restart_shim(val); + self.set_ice_restart(val); self } - #[doc = "Change the `offerToReceiveAudio` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_offer_to_receive_audio()` instead."] pub fn offer_to_receive_audio(&mut self, val: bool) -> &mut Self { - self.offer_to_receive_audio_shim(val); + self.set_offer_to_receive_audio(val); self } - #[doc = "Change the `offerToReceiveVideo` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + #[deprecated = "Use `set_offer_to_receive_video()` instead."] pub fn offer_to_receive_video(&mut self, val: bool) -> &mut Self { - self.offer_to_receive_video_shim(val); + self.set_offer_to_receive_video(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs index 34881d1b56f..093c0b0af22 100644 --- a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs @@ -10,51 +10,228 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub type RtcOutboundRtpStreamStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_id(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcOutboundRtpStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcOutboundRtpStreamStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateMean")] + pub fn get_bitrate_mean(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcOutboundRtpStreamStats, val: f64); + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateStdDev")] + pub fn get_bitrate_std_dev(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "codecId")] + pub fn get_codec_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "firCount")] + pub fn get_fir_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateMean")] + pub fn get_framerate_mean(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcOutboundRtpStreamStats, val: f64); + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateStdDev")] + pub fn get_framerate_std_dev(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcOutboundRtpStreamStats, val: f64); + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "isRemote")] + pub fn get_is_remote(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcOutboundRtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcOutboundRtpStreamStats, val: bool); + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaTrackId")] + pub fn get_media_track_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaType")] + pub fn get_media_type(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "nackCount")] + pub fn get_nack_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "pliCount")] + pub fn get_pli_count(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "remoteId")] + pub fn get_remote_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "transportId")] + pub fn get_transport_id(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcOutboundRtpStreamStats, val: &str); + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_bytes_sent(this: &RtcOutboundRtpStreamStats, val: f64); + #[doc = "Get the `droppedFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "droppedFrames")] + pub fn get_dropped_frames(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `droppedFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "droppedFrames")] - fn dropped_frames_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_dropped_frames(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `framesEncoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framesEncoded")] + pub fn get_frames_encoded(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `framesEncoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "framesEncoded")] - fn frames_encoded_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_frames_encoded(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "packetsSent")] + pub fn get_packets_sent(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "packetsSent")] - fn packets_sent_shim(this: &RtcOutboundRtpStreamStats, val: u32); + pub fn set_packets_sent(this: &RtcOutboundRtpStreamStats, val: u32); + #[doc = "Get the `targetBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[wasm_bindgen(method, getter = "targetBitrate")] + pub fn get_target_bitrate(this: &RtcOutboundRtpStreamStats) -> Option; + #[doc = "Change the `targetBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] #[wasm_bindgen(method, setter = "targetBitrate")] - fn target_bitrate_shim(this: &RtcOutboundRtpStreamStats, val: f64); + pub fn set_target_bitrate(this: &RtcOutboundRtpStreamStats, val: f64); } impl RtcOutboundRtpStreamStats { #[doc = "Construct a new `RtcOutboundRtpStreamStats`."] @@ -65,159 +242,115 @@ impl RtcOutboundRtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent(val); self } - #[doc = "Change the `droppedFrames` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_dropped_frames()` instead."] pub fn dropped_frames(&mut self, val: u32) -> &mut Self { - self.dropped_frames_shim(val); + self.set_dropped_frames(val); self } - #[doc = "Change the `framesEncoded` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_frames_encoded()` instead."] pub fn frames_encoded(&mut self, val: u32) -> &mut Self { - self.frames_encoded_shim(val); + self.set_frames_encoded(val); self } - #[doc = "Change the `packetsSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_packets_sent()` instead."] pub fn packets_sent(&mut self, val: u32) -> &mut Self { - self.packets_sent_shim(val); + self.set_packets_sent(val); self } - #[doc = "Change the `targetBitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + #[deprecated = "Use `set_target_bitrate()` instead."] pub fn target_bitrate(&mut self, val: f64) -> &mut Self { - self.target_bitrate_shim(val); + self.set_target_bitrate(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs index b82a2c9e22e..17b0a63b4d2 100644 --- a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] pub type RtcPeerConnectionIceEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_bubbles(this: &RtcPeerConnectionIceEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_cancelable(this: &RtcPeerConnectionIceEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &RtcPeerConnectionIceEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + pub fn set_composed(this: &RtcPeerConnectionIceEventInit, val: bool); #[cfg(feature = "RtcIceCandidate")] + #[doc = "Get the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] + #[wasm_bindgen(method, getter = "candidate")] + pub fn get_candidate(this: &RtcPeerConnectionIceEventInit) -> Option; + #[cfg(feature = "RtcIceCandidate")] + #[doc = "Change the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] #[wasm_bindgen(method, setter = "candidate")] - fn candidate_shim(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); + pub fn set_candidate(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); } impl RtcPeerConnectionIceEventInit { #[doc = "Construct a new `RtcPeerConnectionIceEventInit`."] @@ -29,33 +62,25 @@ impl RtcPeerConnectionIceEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "RtcIceCandidate")] - #[doc = "Change the `candidate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] + #[deprecated = "Use `set_candidate()` instead."] pub fn candidate(&mut self, val: Option<&RtcIceCandidate>) -> &mut Self { - self.candidate_shim(val); + self.set_candidate(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs index 37fa913401f..08bcfc0e6ee 100644 --- a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] pub type RtcRtcpParameters; + #[doc = "Get the `cname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[wasm_bindgen(method, getter = "cname")] + pub fn get_cname(this: &RtcRtcpParameters) -> Option; + #[doc = "Change the `cname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, setter = "cname")] - fn cname_shim(this: &RtcRtcpParameters, val: &str); + pub fn set_cname(this: &RtcRtcpParameters, val: &str); + #[doc = "Get the `reducedSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[wasm_bindgen(method, getter = "reducedSize")] + pub fn get_reduced_size(this: &RtcRtcpParameters) -> Option; + #[doc = "Change the `reducedSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] #[wasm_bindgen(method, setter = "reducedSize")] - fn reduced_size_shim(this: &RtcRtcpParameters, val: bool); + pub fn set_reduced_size(this: &RtcRtcpParameters, val: bool); } impl RtcRtcpParameters { #[doc = "Construct a new `RtcRtcpParameters`."] @@ -24,18 +40,14 @@ impl RtcRtcpParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `cname` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[deprecated = "Use `set_cname()` instead."] pub fn cname(&mut self, val: &str) -> &mut Self { - self.cname_shim(val); + self.set_cname(val); self } - #[doc = "Change the `reducedSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + #[deprecated = "Use `set_reduced_size()` instead."] pub fn reduced_size(&mut self, val: bool) -> &mut Self { - self.reduced_size_shim(val); + self.set_reduced_size(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs index b0b0fa4f9de..512311482ba 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] pub type RtcRtpCapabilities; + #[doc = "Get the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[wasm_bindgen(method, getter = "codecs")] + pub fn get_codecs(this: &RtcRtpCapabilities) -> ::js_sys::Array; + #[doc = "Change the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, setter = "codecs")] - fn codecs_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_codecs(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[wasm_bindgen(method, getter = "headerExtensions")] + pub fn get_header_extensions(this: &RtcRtpCapabilities) -> ::js_sys::Array; + #[doc = "Change the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] #[wasm_bindgen(method, setter = "headerExtensions")] - fn header_extensions_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + pub fn set_header_extensions(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); } impl RtcRtpCapabilities { #[doc = "Construct a new `RtcRtpCapabilities`."] @@ -29,18 +45,14 @@ impl RtcRtpCapabilities { ret.header_extensions(header_extensions); ret } - #[doc = "Change the `codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[deprecated = "Use `set_codecs()` instead."] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codecs_shim(val); + self.set_codecs(val); self } - #[doc = "Change the `headerExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + #[deprecated = "Use `set_header_extensions()` instead."] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.header_extensions_shim(val); + self.set_header_extensions(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs index 1e229356986..c398df3fdb6 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub type RtcRtpCodecCapability; + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[wasm_bindgen(method, getter = "channels")] + pub fn get_channels(this: &RtcRtpCodecCapability) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcRtpCodecCapability, val: u16); + pub fn set_channels(this: &RtcRtpCodecCapability, val: u16); + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[wasm_bindgen(method, getter = "clockRate")] + pub fn get_clock_rate(this: &RtcRtpCodecCapability) -> u32; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcRtpCodecCapability, val: u32); + pub fn set_clock_rate(this: &RtcRtpCodecCapability, val: u32); + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[wasm_bindgen(method, getter = "mimeType")] + pub fn get_mime_type(this: &RtcRtpCodecCapability) -> String; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &RtcRtpCodecCapability, val: &str); + pub fn set_mime_type(this: &RtcRtpCodecCapability, val: &str); + #[doc = "Get the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[wasm_bindgen(method, getter = "sdpFmtpLine")] + pub fn get_sdp_fmtp_line(this: &RtcRtpCodecCapability) -> Option; + #[doc = "Change the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn sdp_fmtp_line_shim(this: &RtcRtpCodecCapability, val: &str); + pub fn set_sdp_fmtp_line(this: &RtcRtpCodecCapability, val: &str); } impl RtcRtpCodecCapability { #[doc = "Construct a new `RtcRtpCodecCapability`."] @@ -30,32 +62,24 @@ impl RtcRtpCodecCapability { ret.mime_type(mime_type); ret } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u16) -> &mut Self { - self.channels_shim(val); + self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type(val); self } - #[doc = "Change the `sdpFmtpLine` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + #[deprecated = "Use `set_sdp_fmtp_line()` instead."] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { - self.sdp_fmtp_line_shim(val); + self.set_sdp_fmtp_line(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs index 0293a310175..eefd4a90474 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub type RtcRtpCodecParameters; + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[wasm_bindgen(method, getter = "channels")] + pub fn get_channels(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcRtpCodecParameters, val: u16); + pub fn set_channels(this: &RtcRtpCodecParameters, val: u16); + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[wasm_bindgen(method, getter = "clockRate")] + pub fn get_clock_rate(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcRtpCodecParameters, val: u32); + pub fn set_clock_rate(this: &RtcRtpCodecParameters, val: u32); + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[wasm_bindgen(method, getter = "mimeType")] + pub fn get_mime_type(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &RtcRtpCodecParameters, val: &str); + pub fn set_mime_type(this: &RtcRtpCodecParameters, val: &str); + #[doc = "Get the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[wasm_bindgen(method, getter = "payloadType")] + pub fn get_payload_type(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "payloadType")] - fn payload_type_shim(this: &RtcRtpCodecParameters, val: u16); + pub fn set_payload_type(this: &RtcRtpCodecParameters, val: u16); + #[doc = "Get the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[wasm_bindgen(method, getter = "sdpFmtpLine")] + pub fn get_sdp_fmtp_line(this: &RtcRtpCodecParameters) -> Option; + #[doc = "Change the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn sdp_fmtp_line_shim(this: &RtcRtpCodecParameters, val: &str); + pub fn set_sdp_fmtp_line(this: &RtcRtpCodecParameters, val: &str); } impl RtcRtpCodecParameters { #[doc = "Construct a new `RtcRtpCodecParameters`."] @@ -30,39 +70,29 @@ impl RtcRtpCodecParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channels` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_channels()` instead."] pub fn channels(&mut self, val: u16) -> &mut Self { - self.channels_shim(val); + self.set_channels(val); self } - #[doc = "Change the `clockRate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_clock_rate()` instead."] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate(val); self } - #[doc = "Change the `mimeType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_mime_type()` instead."] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type(val); self } - #[doc = "Change the `payloadType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_payload_type()` instead."] pub fn payload_type(&mut self, val: u16) -> &mut Self { - self.payload_type_shim(val); + self.set_payload_type(val); self } - #[doc = "Change the `sdpFmtpLine` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + #[deprecated = "Use `set_sdp_fmtp_line()` instead."] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { - self.sdp_fmtp_line_shim(val); + self.set_sdp_fmtp_line(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs index 5cec0c96708..dc78cb31ad8 100644 --- a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] pub type RtcRtpContributingSource; + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[wasm_bindgen(method, getter = "audioLevel")] + pub fn get_audio_level(this: &RtcRtpContributingSource) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpContributingSource, val: f64); + pub fn set_audio_level(this: &RtcRtpContributingSource, val: f64); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &RtcRtpContributingSource) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpContributingSource, val: u32); + pub fn set_source(this: &RtcRtpContributingSource, val: u32); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcRtpContributingSource) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpContributingSource, val: f64); + pub fn set_timestamp(this: &RtcRtpContributingSource, val: f64); } impl RtcRtpContributingSource { #[doc = "Construct a new `RtcRtpContributingSource`."] @@ -28,25 +52,19 @@ impl RtcRtpContributingSource { ret.timestamp(timestamp); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs index 1c8e1ed3b00..e9a65e07012 100644 --- a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs @@ -10,30 +10,127 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub type RtcRtpEncodingParameters; + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "active")] + pub fn get_active(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &RtcRtpEncodingParameters, val: bool); + pub fn set_active(this: &RtcRtpEncodingParameters, val: bool); + #[cfg(feature = "RtcDegradationPreference")] + #[doc = "Get the `degradationPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "degradationPreference")] + pub fn get_degradation_preference( + this: &RtcRtpEncodingParameters, + ) -> Option; #[cfg(feature = "RtcDegradationPreference")] + #[doc = "Change the `degradationPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "degradationPreference")] - fn degradation_preference_shim(this: &RtcRtpEncodingParameters, val: RtcDegradationPreference); + pub fn set_degradation_preference( + this: &RtcRtpEncodingParameters, + val: RtcDegradationPreference, + ); + #[cfg(feature = "RtcFecParameters")] + #[doc = "Get the `fec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "fec")] + pub fn get_fec(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcFecParameters")] + #[doc = "Change the `fec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "fec")] - fn fec_shim(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); + pub fn set_fec(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); + #[doc = "Get the `maxBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "maxBitrate")] + pub fn get_max_bitrate(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `maxBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "maxBitrate")] - fn max_bitrate_shim(this: &RtcRtpEncodingParameters, val: u32); + pub fn set_max_bitrate(this: &RtcRtpEncodingParameters, val: u32); + #[cfg(feature = "RtcPriorityType")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "priority")] + pub fn get_priority(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcPriorityType")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &RtcRtpEncodingParameters, val: RtcPriorityType); + pub fn set_priority(this: &RtcRtpEncodingParameters, val: RtcPriorityType); + #[doc = "Get the `rid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "rid")] + pub fn get_rid(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `rid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "rid")] - fn rid_shim(this: &RtcRtpEncodingParameters, val: &str); + pub fn set_rid(this: &RtcRtpEncodingParameters, val: &str); + #[cfg(feature = "RtcRtxParameters")] + #[doc = "Get the `rtx` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] + #[wasm_bindgen(method, getter = "rtx")] + pub fn get_rtx(this: &RtcRtpEncodingParameters) -> Option; #[cfg(feature = "RtcRtxParameters")] + #[doc = "Change the `rtx` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] #[wasm_bindgen(method, setter = "rtx")] - fn rtx_shim(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); + pub fn set_rtx(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "scalabilityMode")] + pub fn get_scalability_mode(this: &RtcRtpEncodingParameters) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "scalabilityMode")] - fn scalability_mode_shim(this: &RtcRtpEncodingParameters, val: &str); + pub fn set_scalability_mode(this: &RtcRtpEncodingParameters, val: &str); + #[doc = "Get the `scaleResolutionDownBy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "scaleResolutionDownBy")] + pub fn get_scale_resolution_down_by(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `scaleResolutionDownBy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "scaleResolutionDownBy")] - fn scale_resolution_down_by_shim(this: &RtcRtpEncodingParameters, val: f32); + pub fn set_scale_resolution_down_by(this: &RtcRtpEncodingParameters, val: f32); + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcRtpEncodingParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcRtpEncodingParameters, val: u32); + pub fn set_ssrc(this: &RtcRtpEncodingParameters, val: u32); } impl RtcRtpEncodingParameters { #[doc = "Construct a new `RtcRtpEncodingParameters`."] @@ -44,82 +141,59 @@ impl RtcRtpEncodingParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: bool) -> &mut Self { - self.active_shim(val); + self.set_active(val); self } #[cfg(feature = "RtcDegradationPreference")] - #[doc = "Change the `degradationPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_degradation_preference()` instead."] pub fn degradation_preference(&mut self, val: RtcDegradationPreference) -> &mut Self { - self.degradation_preference_shim(val); + self.set_degradation_preference(val); self } #[cfg(feature = "RtcFecParameters")] - #[doc = "Change the `fec` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_fec()` instead."] pub fn fec(&mut self, val: &RtcFecParameters) -> &mut Self { - self.fec_shim(val); + self.set_fec(val); self } - #[doc = "Change the `maxBitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_max_bitrate()` instead."] pub fn max_bitrate(&mut self, val: u32) -> &mut Self { - self.max_bitrate_shim(val); + self.set_max_bitrate(val); self } #[cfg(feature = "RtcPriorityType")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: RtcPriorityType) -> &mut Self { - self.priority_shim(val); + self.set_priority(val); self } - #[doc = "Change the `rid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_rid()` instead."] pub fn rid(&mut self, val: &str) -> &mut Self { - self.rid_shim(val); + self.set_rid(val); self } #[cfg(feature = "RtcRtxParameters")] - #[doc = "Change the `rtx` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] + #[deprecated = "Use `set_rtx()` instead."] pub fn rtx(&mut self, val: &RtcRtxParameters) -> &mut Self { - self.rtx_shim(val); + self.set_rtx(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `scalabilityMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_scalability_mode()` instead."] pub fn scalability_mode(&mut self, val: &str) -> &mut Self { - self.scalability_mode_shim(val); + self.set_scalability_mode(val); self } - #[doc = "Change the `scaleResolutionDownBy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_scale_resolution_down_by()` instead."] pub fn scale_resolution_down_by(&mut self, val: f32) -> &mut Self { - self.scale_resolution_down_by_shim(val); + self.set_scale_resolution_down_by(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs index 3a263a719e0..9372c5da79a 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] pub type RtcRtpHeaderExtensionCapability; + #[doc = "Get the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] + #[wasm_bindgen(method, getter = "uri")] + pub fn get_uri(this: &RtcRtpHeaderExtensionCapability) -> String; + #[doc = "Change the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] #[wasm_bindgen(method, setter = "uri")] - fn uri_shim(this: &RtcRtpHeaderExtensionCapability, val: &str); + pub fn set_uri(this: &RtcRtpHeaderExtensionCapability, val: &str); } impl RtcRtpHeaderExtensionCapability { #[doc = "Construct a new `RtcRtpHeaderExtensionCapability`."] @@ -23,11 +31,9 @@ impl RtcRtpHeaderExtensionCapability { ret.uri(uri); ret } - #[doc = "Change the `uri` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] + #[deprecated = "Use `set_uri()` instead."] pub fn uri(&mut self, val: &str) -> &mut Self { - self.uri_shim(val); + self.set_uri(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs index bd09da10daf..aeeeb11cc80 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] pub type RtcRtpHeaderExtensionParameters; + #[doc = "Get the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[wasm_bindgen(method, getter = "encrypted")] + pub fn get_encrypted(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "encrypted")] - fn encrypted_shim(this: &RtcRtpHeaderExtensionParameters, val: bool); + pub fn set_encrypted(this: &RtcRtpHeaderExtensionParameters, val: bool); + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcRtpHeaderExtensionParameters, val: u16); + pub fn set_id(this: &RtcRtpHeaderExtensionParameters, val: u16); + #[doc = "Get the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[wasm_bindgen(method, getter = "uri")] + pub fn get_uri(this: &RtcRtpHeaderExtensionParameters) -> Option; + #[doc = "Change the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] #[wasm_bindgen(method, setter = "uri")] - fn uri_shim(this: &RtcRtpHeaderExtensionParameters, val: &str); + pub fn set_uri(this: &RtcRtpHeaderExtensionParameters, val: &str); } impl RtcRtpHeaderExtensionParameters { #[doc = "Construct a new `RtcRtpHeaderExtensionParameters`."] @@ -26,25 +50,19 @@ impl RtcRtpHeaderExtensionParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `encrypted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_encrypted()` instead."] pub fn encrypted(&mut self, val: bool) -> &mut Self { - self.encrypted_shim(val); + self.set_encrypted(val); self } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: u16) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `uri` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + #[deprecated = "Use `set_uri()` instead."] pub fn uri(&mut self, val: &str) -> &mut Self { - self.uri_shim(val); + self.set_uri(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpParameters.rs b/crates/web-sys/src/features/gen_RtcRtpParameters.rs index 1b260e0ea55..cd4bd2fa35a 100644 --- a/crates/web-sys/src/features/gen_RtcRtpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpParameters.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] pub type RtcRtpParameters; + #[doc = "Get the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[wasm_bindgen(method, getter = "codecs")] + pub fn get_codecs(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "codecs")] - fn codecs_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_codecs(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `encodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[wasm_bindgen(method, getter = "encodings")] + pub fn get_encodings(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `encodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "encodings")] - fn encodings_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_encodings(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[wasm_bindgen(method, getter = "headerExtensions")] + pub fn get_header_extensions(this: &RtcRtpParameters) -> Option<::js_sys::Array>; + #[doc = "Change the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "headerExtensions")] - fn header_extensions_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + pub fn set_header_extensions(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); #[cfg(feature = "RtcRtcpParameters")] + #[doc = "Get the `rtcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] + #[wasm_bindgen(method, getter = "rtcp")] + pub fn get_rtcp(this: &RtcRtpParameters) -> Option; + #[cfg(feature = "RtcRtcpParameters")] + #[doc = "Change the `rtcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] #[wasm_bindgen(method, setter = "rtcp")] - fn rtcp_shim(this: &RtcRtpParameters, val: &RtcRtcpParameters); + pub fn set_rtcp(this: &RtcRtpParameters, val: &RtcRtcpParameters); } impl RtcRtpParameters { #[doc = "Construct a new `RtcRtpParameters`."] @@ -29,33 +62,25 @@ impl RtcRtpParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_codecs()` instead."] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codecs_shim(val); + self.set_codecs(val); self } - #[doc = "Change the `encodings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_encodings()` instead."] pub fn encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.encodings_shim(val); + self.set_encodings(val); self } - #[doc = "Change the `headerExtensions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + #[deprecated = "Use `set_header_extensions()` instead."] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.header_extensions_shim(val); + self.set_header_extensions(val); self } #[cfg(feature = "RtcRtcpParameters")] - #[doc = "Change the `rtcp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] + #[deprecated = "Use `set_rtcp()` instead."] pub fn rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self { - self.rtcp_shim(val); + self.set_rtcp(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs index 3983d4b3827..880bb6be41d 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub type RtcRtpSourceEntry; + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[wasm_bindgen(method, getter = "audioLevel")] + pub fn get_audio_level(this: &RtcRtpSourceEntry) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpSourceEntry, val: f64); + pub fn set_audio_level(this: &RtcRtpSourceEntry, val: f64); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &RtcRtpSourceEntry) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpSourceEntry, val: u32); + pub fn set_source(this: &RtcRtpSourceEntry, val: u32); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcRtpSourceEntry) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpSourceEntry, val: f64); + pub fn set_timestamp(this: &RtcRtpSourceEntry, val: f64); + #[doc = "Get the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[wasm_bindgen(method, getter = "voiceActivityFlag")] + pub fn get_voice_activity_flag(this: &RtcRtpSourceEntry) -> Option; + #[doc = "Change the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn voice_activity_flag_shim(this: &RtcRtpSourceEntry, val: Option); + pub fn set_voice_activity_flag(this: &RtcRtpSourceEntry, val: Option); #[cfg(feature = "RtcRtpSourceEntryType")] + #[doc = "Get the `sourceType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] + #[wasm_bindgen(method, getter = "sourceType")] + pub fn get_source_type(this: &RtcRtpSourceEntry) -> RtcRtpSourceEntryType; + #[cfg(feature = "RtcRtpSourceEntryType")] + #[doc = "Change the `sourceType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] #[wasm_bindgen(method, setter = "sourceType")] - fn source_type_shim(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); + pub fn set_source_type(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); } impl RtcRtpSourceEntry { #[cfg(feature = "RtcRtpSourceEntryType")] @@ -35,40 +76,30 @@ impl RtcRtpSourceEntry { ret.source_type(source_type); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } - #[doc = "Change the `voiceActivityFlag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + #[deprecated = "Use `set_voice_activity_flag()` instead."] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { - self.voice_activity_flag_shim(val); + self.set_voice_activity_flag(val); self } #[cfg(feature = "RtcRtpSourceEntryType")] - #[doc = "Change the `sourceType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] + #[deprecated = "Use `set_source_type()` instead."] pub fn source_type(&mut self, val: RtcRtpSourceEntryType) -> &mut Self { - self.source_type_shim(val); + self.set_source_type(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs index 3b58feee346..ad2d27e2feb 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub type RtcRtpSynchronizationSource; + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[wasm_bindgen(method, getter = "audioLevel")] + pub fn get_audio_level(this: &RtcRtpSynchronizationSource) -> Option; + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpSynchronizationSource, val: f64); + pub fn set_audio_level(this: &RtcRtpSynchronizationSource, val: f64); + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &RtcRtpSynchronizationSource) -> u32; + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpSynchronizationSource, val: u32); + pub fn set_source(this: &RtcRtpSynchronizationSource, val: u32); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcRtpSynchronizationSource) -> f64; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpSynchronizationSource, val: f64); + pub fn set_timestamp(this: &RtcRtpSynchronizationSource, val: f64); + #[doc = "Get the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[wasm_bindgen(method, getter = "voiceActivityFlag")] + pub fn get_voice_activity_flag(this: &RtcRtpSynchronizationSource) -> Option; + #[doc = "Change the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn voice_activity_flag_shim(this: &RtcRtpSynchronizationSource, val: Option); + pub fn set_voice_activity_flag(this: &RtcRtpSynchronizationSource, val: Option); } impl RtcRtpSynchronizationSource { #[doc = "Construct a new `RtcRtpSynchronizationSource`."] @@ -30,32 +62,24 @@ impl RtcRtpSynchronizationSource { ret.timestamp(timestamp); ret } - #[doc = "Change the `audioLevel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_audio_level()` instead."] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level(val); self } - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } - #[doc = "Change the `voiceActivityFlag` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + #[deprecated = "Use `set_voice_activity_flag()` instead."] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { - self.voice_activity_flag_shim(val); + self.set_voice_activity_flag(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs index 47fbc05961d..e0aae6edc7c 100644 --- a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs +++ b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs @@ -11,12 +11,37 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] pub type RtcRtpTransceiverInit; #[cfg(feature = "RtcRtpTransceiverDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] + #[wasm_bindgen(method, getter = "direction")] + pub fn get_direction(this: &RtcRtpTransceiverInit) -> Option; + #[cfg(feature = "RtcRtpTransceiverDirection")] + #[doc = "Change the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); + pub fn set_direction(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); + #[doc = "Get the `sendEncodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[wasm_bindgen(method, getter = "sendEncodings")] + pub fn get_send_encodings(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `sendEncodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "sendEncodings")] - fn send_encodings_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + pub fn set_send_encodings(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[wasm_bindgen(method, getter = "streams")] + pub fn get_streams(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>; + #[doc = "Change the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] #[wasm_bindgen(method, setter = "streams")] - fn streams_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + pub fn set_streams(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); } impl RtcRtpTransceiverInit { #[doc = "Construct a new `RtcRtpTransceiverInit`."] @@ -28,25 +53,19 @@ impl RtcRtpTransceiverInit { ret } #[cfg(feature = "RtcRtpTransceiverDirection")] - #[doc = "Change the `direction` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_direction()` instead."] pub fn direction(&mut self, val: RtcRtpTransceiverDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction(val); self } - #[doc = "Change the `sendEncodings` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_send_encodings()` instead."] pub fn send_encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.send_encodings_shim(val); + self.set_send_encodings(val); self } - #[doc = "Change the `streams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + #[deprecated = "Use `set_streams()` instead."] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.streams_shim(val); + self.set_streams(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtxParameters.rs b/crates/web-sys/src/features/gen_RtcRtxParameters.rs index 29aba89a545..6fef2de956b 100644 --- a/crates/web-sys/src/features/gen_RtcRtxParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtxParameters.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] pub type RtcRtxParameters; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcRtxParameters) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcRtxParameters, val: u32); + pub fn set_ssrc(this: &RtcRtxParameters, val: u32); } impl RtcRtxParameters { #[doc = "Construct a new `RtcRtxParameters`."] @@ -22,11 +30,9 @@ impl RtcRtxParameters { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs index e0b20763b49..7c159a09ef2 100644 --- a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs +++ b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs @@ -10,11 +10,28 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] pub type RtcSessionDescriptionInit; + #[doc = "Get the `sdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] + #[wasm_bindgen(method, getter = "sdp")] + pub fn get_sdp(this: &RtcSessionDescriptionInit) -> Option; + #[doc = "Change the `sdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] #[wasm_bindgen(method, setter = "sdp")] - fn sdp_shim(this: &RtcSessionDescriptionInit, val: &str); + pub fn set_sdp(this: &RtcSessionDescriptionInit, val: &str); #[cfg(feature = "RtcSdpType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcSessionDescriptionInit) -> RtcSdpType; + #[cfg(feature = "RtcSdpType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcSessionDescriptionInit, val: RtcSdpType); + pub fn set_type(this: &RtcSessionDescriptionInit, val: RtcSdpType); } impl RtcSessionDescriptionInit { #[cfg(feature = "RtcSdpType")] @@ -27,19 +44,15 @@ impl RtcSessionDescriptionInit { ret.type_(type_); ret } - #[doc = "Change the `sdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] + #[deprecated = "Use `set_sdp()` instead."] pub fn sdp(&mut self, val: &str) -> &mut Self { - self.sdp_shim(val); + self.set_sdp(val); self } #[cfg(feature = "RtcSdpType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcSdpType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcStats.rs b/crates/web-sys/src/features/gen_RtcStats.rs index ecbb178de3f..76e02fe410b 100644 --- a/crates/web-sys/src/features/gen_RtcStats.rs +++ b/crates/web-sys/src/features/gen_RtcStats.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] pub type RtcStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcStats, val: &str); + pub fn set_id(this: &RtcStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcStats, val: f64); + pub fn set_timestamp(this: &RtcStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcStats) -> Option; #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcStats, val: RtcStatsType); + pub fn set_type(this: &RtcStats, val: RtcStatsType); } impl RtcStats { #[doc = "Construct a new `RtcStats`."] @@ -27,26 +52,20 @@ impl RtcStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs index a08365bf1a0..620270ec598 100644 --- a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs +++ b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs @@ -10,51 +10,235 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub type RtcStatsReportInternal; + #[doc = "Get the `closed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "closed")] + pub fn get_closed(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `closed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "closed")] - fn closed_shim(this: &RtcStatsReportInternal, val: bool); + pub fn set_closed(this: &RtcStatsReportInternal, val: bool); + #[doc = "Get the `codecStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "codecStats")] + pub fn get_codec_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `codecStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "codecStats")] - fn codec_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_codec_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `iceCandidatePairStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "iceCandidatePairStats")] + pub fn get_ice_candidate_pair_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceCandidatePairStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceCandidatePairStats")] - fn ice_candidate_pair_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_candidate_pair_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[doc = "Get the `iceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "iceCandidateStats")] + pub fn get_ice_candidate_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceCandidateStats")] - fn ice_candidate_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_candidate_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `iceComponentStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "iceComponentStats")] + pub fn get_ice_component_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `iceComponentStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceComponentStats")] - fn ice_component_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_ice_component_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `iceRestarts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "iceRestarts")] + pub fn get_ice_restarts(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `iceRestarts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceRestarts")] - fn ice_restarts_shim(this: &RtcStatsReportInternal, val: u32); + pub fn set_ice_restarts(this: &RtcStatsReportInternal, val: u32); + #[doc = "Get the `iceRollbacks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "iceRollbacks")] + pub fn get_ice_rollbacks(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `iceRollbacks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "iceRollbacks")] - fn ice_rollbacks_shim(this: &RtcStatsReportInternal, val: u32); + pub fn set_ice_rollbacks(this: &RtcStatsReportInternal, val: u32); + #[doc = "Get the `inboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "inboundRTPStreamStats")] + pub fn get_inbound_rtp_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `inboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "inboundRTPStreamStats")] - fn inbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_inbound_rtp_stream_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[doc = "Get the `localSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "localSdp")] + pub fn get_local_sdp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `localSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "localSdp")] - fn local_sdp_shim(this: &RtcStatsReportInternal, val: &str); + pub fn set_local_sdp(this: &RtcStatsReportInternal, val: &str); + #[doc = "Get the `mediaStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "mediaStreamStats")] + pub fn get_media_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `mediaStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "mediaStreamStats")] - fn media_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_media_stream_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `mediaStreamTrackStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "mediaStreamTrackStats")] + pub fn get_media_stream_track_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `mediaStreamTrackStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "mediaStreamTrackStats")] - fn media_stream_track_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_media_stream_track_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[doc = "Get the `offerer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "offerer")] + pub fn get_offerer(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `offerer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "offerer")] - fn offerer_shim(this: &RtcStatsReportInternal, val: bool); + pub fn set_offerer(this: &RtcStatsReportInternal, val: bool); + #[doc = "Get the `outboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "outboundRTPStreamStats")] + pub fn get_outbound_rtp_stream_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `outboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "outboundRTPStreamStats")] - fn outbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_outbound_rtp_stream_stats( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[doc = "Get the `pcid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "pcid")] + pub fn get_pcid(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `pcid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "pcid")] - fn pcid_shim(this: &RtcStatsReportInternal, val: &str); + pub fn set_pcid(this: &RtcStatsReportInternal, val: &str); + #[doc = "Get the `rawLocalCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "rawLocalCandidates")] + pub fn get_raw_local_candidates(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `rawLocalCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rawLocalCandidates")] - fn raw_local_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_raw_local_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `rawRemoteCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "rawRemoteCandidates")] + pub fn get_raw_remote_candidates(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `rawRemoteCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rawRemoteCandidates")] - fn raw_remote_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_raw_remote_candidates(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `remoteSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "remoteSdp")] + pub fn get_remote_sdp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `remoteSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "remoteSdp")] - fn remote_sdp_shim(this: &RtcStatsReportInternal, val: &str); + pub fn set_remote_sdp(this: &RtcStatsReportInternal, val: &str); + #[doc = "Get the `rtpContributingSourceStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "rtpContributingSourceStats")] + pub fn get_rtp_contributing_source_stats( + this: &RtcStatsReportInternal, + ) -> Option<::js_sys::Array>; + #[doc = "Change the `rtpContributingSourceStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "rtpContributingSourceStats")] - fn rtp_contributing_source_stats_shim( + pub fn set_rtp_contributing_source_stats( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcStatsReportInternal) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcStatsReportInternal, val: f64); + pub fn set_timestamp(this: &RtcStatsReportInternal, val: f64); + #[doc = "Get the `transportStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "transportStats")] + pub fn get_transport_stats(this: &RtcStatsReportInternal) -> Option<::js_sys::Array>; + #[doc = "Change the `transportStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "transportStats")] - fn transport_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + pub fn set_transport_stats(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `trickledIceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[wasm_bindgen(method, getter = "trickledIceCandidateStats")] + pub fn get_trickled_ice_candidate_stats( + this: &RtcStatsReportInternal, + ) -> Option<::js_sys::Array>; + #[doc = "Change the `trickledIceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] #[wasm_bindgen(method, setter = "trickledIceCandidateStats")] - fn trickled_ice_candidate_stats_shim( + pub fn set_trickled_ice_candidate_stats( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); @@ -68,151 +252,109 @@ impl RtcStatsReportInternal { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `closed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_closed()` instead."] pub fn closed(&mut self, val: bool) -> &mut Self { - self.closed_shim(val); + self.set_closed(val); self } - #[doc = "Change the `codecStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_codec_stats()` instead."] pub fn codec_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codec_stats_shim(val); + self.set_codec_stats(val); self } - #[doc = "Change the `iceCandidatePairStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_candidate_pair_stats()` instead."] pub fn ice_candidate_pair_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_candidate_pair_stats_shim(val); + self.set_ice_candidate_pair_stats(val); self } - #[doc = "Change the `iceCandidateStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_candidate_stats()` instead."] pub fn ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_candidate_stats_shim(val); + self.set_ice_candidate_stats(val); self } - #[doc = "Change the `iceComponentStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_component_stats()` instead."] pub fn ice_component_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_component_stats_shim(val); + self.set_ice_component_stats(val); self } - #[doc = "Change the `iceRestarts` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_restarts()` instead."] pub fn ice_restarts(&mut self, val: u32) -> &mut Self { - self.ice_restarts_shim(val); + self.set_ice_restarts(val); self } - #[doc = "Change the `iceRollbacks` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_ice_rollbacks()` instead."] pub fn ice_rollbacks(&mut self, val: u32) -> &mut Self { - self.ice_rollbacks_shim(val); + self.set_ice_rollbacks(val); self } - #[doc = "Change the `inboundRTPStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_inbound_rtp_stream_stats()` instead."] pub fn inbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.inbound_rtp_stream_stats_shim(val); + self.set_inbound_rtp_stream_stats(val); self } - #[doc = "Change the `localSdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_local_sdp()` instead."] pub fn local_sdp(&mut self, val: &str) -> &mut Self { - self.local_sdp_shim(val); + self.set_local_sdp(val); self } - #[doc = "Change the `mediaStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_media_stream_stats()` instead."] pub fn media_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.media_stream_stats_shim(val); + self.set_media_stream_stats(val); self } - #[doc = "Change the `mediaStreamTrackStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_media_stream_track_stats()` instead."] pub fn media_stream_track_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.media_stream_track_stats_shim(val); + self.set_media_stream_track_stats(val); self } - #[doc = "Change the `offerer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_offerer()` instead."] pub fn offerer(&mut self, val: bool) -> &mut Self { - self.offerer_shim(val); + self.set_offerer(val); self } - #[doc = "Change the `outboundRTPStreamStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_outbound_rtp_stream_stats()` instead."] pub fn outbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.outbound_rtp_stream_stats_shim(val); + self.set_outbound_rtp_stream_stats(val); self } - #[doc = "Change the `pcid` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_pcid()` instead."] pub fn pcid(&mut self, val: &str) -> &mut Self { - self.pcid_shim(val); + self.set_pcid(val); self } - #[doc = "Change the `rawLocalCandidates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_raw_local_candidates()` instead."] pub fn raw_local_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.raw_local_candidates_shim(val); + self.set_raw_local_candidates(val); self } - #[doc = "Change the `rawRemoteCandidates` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_raw_remote_candidates()` instead."] pub fn raw_remote_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.raw_remote_candidates_shim(val); + self.set_raw_remote_candidates(val); self } - #[doc = "Change the `remoteSdp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_remote_sdp()` instead."] pub fn remote_sdp(&mut self, val: &str) -> &mut Self { - self.remote_sdp_shim(val); + self.set_remote_sdp(val); self } - #[doc = "Change the `rtpContributingSourceStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_rtp_contributing_source_stats()` instead."] pub fn rtp_contributing_source_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.rtp_contributing_source_stats_shim(val); + self.set_rtp_contributing_source_stats(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } - #[doc = "Change the `transportStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_transport_stats()` instead."] pub fn transport_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.transport_stats_shim(val); + self.set_transport_stats(val); self } - #[doc = "Change the `trickledIceCandidateStats` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + #[deprecated = "Use `set_trickled_ice_candidate_stats()` instead."] pub fn trickled_ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.trickled_ice_candidate_stats_shim(val); + self.set_trickled_ice_candidate_stats(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs index 03ef80243d1..e76dc70c25d 100644 --- a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs @@ -10,23 +10,82 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub type RtcTrackEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcTrackEventInit, val: bool); + pub fn set_bubbles(this: &RtcTrackEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcTrackEventInit, val: bool); + pub fn set_cancelable(this: &RtcTrackEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &RtcTrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcTrackEventInit, val: bool); + pub fn set_composed(this: &RtcTrackEventInit, val: bool); #[cfg(feature = "RtcRtpReceiver")] + #[doc = "Get the `receiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "receiver")] + pub fn get_receiver(this: &RtcTrackEventInit) -> RtcRtpReceiver; + #[cfg(feature = "RtcRtpReceiver")] + #[doc = "Change the `receiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "receiver")] - fn receiver_shim(this: &RtcTrackEventInit, val: &RtcRtpReceiver); + pub fn set_receiver(this: &RtcTrackEventInit, val: &RtcRtpReceiver); + #[doc = "Get the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "streams")] + pub fn get_streams(this: &RtcTrackEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "streams")] - fn streams_shim(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_streams(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "track")] + pub fn get_track(this: &RtcTrackEventInit) -> MediaStreamTrack; + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &RtcTrackEventInit, val: &MediaStreamTrack); + pub fn set_track(this: &RtcTrackEventInit, val: &MediaStreamTrack); + #[cfg(feature = "RtcRtpTransceiver")] + #[doc = "Get the `transceiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] + #[wasm_bindgen(method, getter = "transceiver")] + pub fn get_transceiver(this: &RtcTrackEventInit) -> RtcRtpTransceiver; #[cfg(feature = "RtcRtpTransceiver")] + #[doc = "Change the `transceiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] #[wasm_bindgen(method, setter = "transceiver")] - fn transceiver_shim(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); + pub fn set_transceiver(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); } impl RtcTrackEventInit { #[cfg(all( @@ -49,56 +108,42 @@ impl RtcTrackEventInit { ret.transceiver(transceiver); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "RtcRtpReceiver")] - #[doc = "Change the `receiver` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_receiver()` instead."] pub fn receiver(&mut self, val: &RtcRtpReceiver) -> &mut Self { - self.receiver_shim(val); + self.set_receiver(val); self } - #[doc = "Change the `streams` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + #[deprecated = "Use `set_streams()` instead."] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.streams_shim(val); + self.set_streams(val); self } #[cfg(feature = "MediaStreamTrack")] - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track(val); self } #[cfg(feature = "RtcRtpTransceiver")] - #[doc = "Change the `transceiver` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] + #[deprecated = "Use `set_transceiver()` instead."] pub fn transceiver(&mut self, val: &RtcRtpTransceiver) -> &mut Self { - self.transceiver_shim(val); + self.set_transceiver(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcTransportStats.rs b/crates/web-sys/src/features/gen_RtcTransportStats.rs index d76e5bb3220..6564b4c1fab 100644 --- a/crates/web-sys/src/features/gen_RtcTransportStats.rs +++ b/crates/web-sys/src/features/gen_RtcTransportStats.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub type RtcTransportStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcTransportStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcTransportStats, val: &str); + pub fn set_id(this: &RtcTransportStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcTransportStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcTransportStats, val: f64); + pub fn set_timestamp(this: &RtcTransportStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcTransportStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcTransportStats, val: RtcStatsType); + pub fn set_type(this: &RtcTransportStats, val: RtcStatsType); + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &RtcTransportStats) -> Option; + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcTransportStats, val: u32); + pub fn set_bytes_received(this: &RtcTransportStats, val: u32); + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &RtcTransportStats) -> Option; + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcTransportStats, val: u32); + pub fn set_bytes_sent(this: &RtcTransportStats, val: u32); } impl RtcTransportStats { #[doc = "Construct a new `RtcTransportStats`."] @@ -31,40 +72,30 @@ impl RtcTransportStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `bytesReceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_bytes_received()` instead."] pub fn bytes_received(&mut self, val: u32) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received(val); self } - #[doc = "Change the `bytesSent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + #[deprecated = "Use `set_bytes_sent()` instead."] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs index 5232911bd6a..760ea9dceff 100644 --- a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub type RtcdtmfToneChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_bubbles(this: &RtcdtmfToneChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_cancelable(this: &RtcdtmfToneChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + pub fn set_composed(this: &RtcdtmfToneChangeEventInit, val: bool); + #[doc = "Get the `tone` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[wasm_bindgen(method, getter = "tone")] + pub fn get_tone(this: &RtcdtmfToneChangeEventInit) -> Option; + #[doc = "Change the `tone` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] #[wasm_bindgen(method, setter = "tone")] - fn tone_shim(this: &RtcdtmfToneChangeEventInit, val: &str); + pub fn set_tone(this: &RtcdtmfToneChangeEventInit, val: &str); } impl RtcdtmfToneChangeEventInit { #[doc = "Construct a new `RtcdtmfToneChangeEventInit`."] @@ -28,32 +60,24 @@ impl RtcdtmfToneChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `tone` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + #[deprecated = "Use `set_tone()` instead."] pub fn tone(&mut self, val: &str) -> &mut Self { - self.tone_shim(val); + self.set_tone(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs index 76ba0860223..c072f988065 100644 --- a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub type RtcrtpContributingSourceStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcrtpContributingSourceStats, val: &str); + pub fn set_id(this: &RtcrtpContributingSourceStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcrtpContributingSourceStats, val: f64); + pub fn set_timestamp(this: &RtcrtpContributingSourceStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcrtpContributingSourceStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcrtpContributingSourceStats, val: RtcStatsType); + pub fn set_type(this: &RtcrtpContributingSourceStats, val: RtcStatsType); + #[doc = "Get the `contributorSsrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[wasm_bindgen(method, getter = "contributorSsrc")] + pub fn get_contributor_ssrc(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `contributorSsrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "contributorSsrc")] - fn contributor_ssrc_shim(this: &RtcrtpContributingSourceStats, val: u32); + pub fn set_contributor_ssrc(this: &RtcrtpContributingSourceStats, val: u32); + #[doc = "Get the `inboundRtpStreamId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[wasm_bindgen(method, getter = "inboundRtpStreamId")] + pub fn get_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats) -> Option; + #[doc = "Change the `inboundRtpStreamId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] #[wasm_bindgen(method, setter = "inboundRtpStreamId")] - fn inbound_rtp_stream_id_shim(this: &RtcrtpContributingSourceStats, val: &str); + pub fn set_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats, val: &str); } impl RtcrtpContributingSourceStats { #[doc = "Construct a new `RtcrtpContributingSourceStats`."] @@ -31,40 +72,30 @@ impl RtcrtpContributingSourceStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `contributorSsrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_contributor_ssrc()` instead."] pub fn contributor_ssrc(&mut self, val: u32) -> &mut Self { - self.contributor_ssrc_shim(val); + self.set_contributor_ssrc(val); self } - #[doc = "Change the `inboundRtpStreamId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + #[deprecated = "Use `set_inbound_rtp_stream_id()` instead."] pub fn inbound_rtp_stream_id(&mut self, val: &str) -> &mut Self { - self.inbound_rtp_stream_id_shim(val); + self.set_inbound_rtp_stream_id(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs index f33e1127499..8348f7fecff 100644 --- a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs @@ -10,41 +10,178 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub type RtcrtpStreamStats; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_id(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcrtpStreamStats, val: f64); + pub fn set_timestamp(this: &RtcrtpStreamStats, val: f64); #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &RtcrtpStreamStats) -> Option; + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcrtpStreamStats, val: RtcStatsType); + pub fn set_type(this: &RtcrtpStreamStats, val: RtcStatsType); + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateMean")] + pub fn get_bitrate_mean(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcrtpStreamStats, val: f64); + pub fn set_bitrate_mean(this: &RtcrtpStreamStats, val: f64); + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "bitrateStdDev")] + pub fn get_bitrate_std_dev(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + pub fn set_bitrate_std_dev(this: &RtcrtpStreamStats, val: f64); + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "codecId")] + pub fn get_codec_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_codec_id(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "firCount")] + pub fn get_fir_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcrtpStreamStats, val: u32); + pub fn set_fir_count(this: &RtcrtpStreamStats, val: u32); + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateMean")] + pub fn get_framerate_mean(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcrtpStreamStats, val: f64); + pub fn set_framerate_mean(this: &RtcrtpStreamStats, val: f64); + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "framerateStdDev")] + pub fn get_framerate_std_dev(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + pub fn set_framerate_std_dev(this: &RtcrtpStreamStats, val: f64); + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "isRemote")] + pub fn get_is_remote(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcrtpStreamStats, val: bool); + pub fn set_is_remote(this: &RtcrtpStreamStats, val: bool); + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaTrackId")] + pub fn get_media_track_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_media_track_id(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "mediaType")] + pub fn get_media_type(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_media_type(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "nackCount")] + pub fn get_nack_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcrtpStreamStats, val: u32); + pub fn set_nack_count(this: &RtcrtpStreamStats, val: u32); + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "pliCount")] + pub fn get_pli_count(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcrtpStreamStats, val: u32); + pub fn set_pli_count(this: &RtcrtpStreamStats, val: u32); + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "remoteId")] + pub fn get_remote_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_remote_id(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "ssrc")] + pub fn get_ssrc(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_ssrc(this: &RtcrtpStreamStats, val: &str); + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[wasm_bindgen(method, getter = "transportId")] + pub fn get_transport_id(this: &RtcrtpStreamStats) -> Option; + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcrtpStreamStats, val: &str); + pub fn set_transport_id(this: &RtcrtpStreamStats, val: &str); } impl RtcrtpStreamStats { #[doc = "Construct a new `RtcrtpStreamStats`."] @@ -55,124 +192,90 @@ impl RtcrtpStreamStats { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `id` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_id()` instead."] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id(val); self } - #[doc = "Change the `timestamp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } #[cfg(feature = "RtcStatsType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `bitrateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_mean()` instead."] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean(val); self } - #[doc = "Change the `bitrateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_bitrate_std_dev()` instead."] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev(val); self } - #[doc = "Change the `codecId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_codec_id()` instead."] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id(val); self } - #[doc = "Change the `firCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_fir_count()` instead."] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count(val); self } - #[doc = "Change the `framerateMean` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_framerate_mean()` instead."] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean(val); self } - #[doc = "Change the `framerateStdDev` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_framerate_std_dev()` instead."] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev(val); self } - #[doc = "Change the `isRemote` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_is_remote()` instead."] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote(val); self } - #[doc = "Change the `mediaTrackId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_media_track_id()` instead."] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id(val); self } - #[doc = "Change the `mediaType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_media_type()` instead."] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type(val); self } - #[doc = "Change the `nackCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_nack_count()` instead."] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count(val); self } - #[doc = "Change the `pliCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_pli_count()` instead."] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count(val); self } - #[doc = "Change the `remoteId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_remote_id()` instead."] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id(val); self } - #[doc = "Change the `ssrc` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_ssrc()` instead."] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc(val); self } - #[doc = "Change the `transportId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + #[deprecated = "Use `set_transport_id()` instead."] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id(val); self } } diff --git a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs index 9502619bfac..3e310a60ca1 100644 --- a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs @@ -14,30 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SaveFilePickerOptions; - #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &SaveFilePickerOptions, val: bool); - #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &SaveFilePickerOptions, val: &str); - #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "suggestedName")] - fn suggested_name_shim(this: &SaveFilePickerOptions, val: Option<&str>); -} -#[cfg(web_sys_unstable_apis)] -impl SaveFilePickerOptions { - #[doc = "Construct a new `SaveFilePickerOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + pub fn get_exclude_accept_all_option(this: &SaveFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `excludeAcceptAllOption` field of this object."] #[doc = ""] @@ -45,10 +30,17 @@ impl SaveFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); - self - } + #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] + pub fn set_exclude_accept_all_option(this: &SaveFilePickerOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "id")] + pub fn get_id(this: &SaveFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `id` field of this object."] #[doc = ""] @@ -56,10 +48,17 @@ impl SaveFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); - self - } + #[wasm_bindgen(method, setter = "id")] + pub fn set_id(this: &SaveFilePickerOptions, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "startIn")] + pub fn get_start_in(this: &SaveFilePickerOptions) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `startIn` field of this object."] #[doc = ""] @@ -67,10 +66,17 @@ impl SaveFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); - self - } + #[wasm_bindgen(method, setter = "startIn")] + pub fn set_start_in(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "types")] + pub fn get_types(this: &SaveFilePickerOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `types` field of this object."] #[doc = ""] @@ -78,10 +84,17 @@ impl SaveFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); - self - } + #[wasm_bindgen(method, setter = "types")] + pub fn set_types(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `suggestedName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "suggestedName")] + pub fn get_suggested_name(this: &SaveFilePickerOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `suggestedName` field of this object."] #[doc = ""] @@ -89,8 +102,50 @@ impl SaveFilePickerOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "suggestedName")] + pub fn set_suggested_name(this: &SaveFilePickerOptions, val: Option<&str>); +} +#[cfg(web_sys_unstable_apis)] +impl SaveFilePickerOptions { + #[doc = "Construct a new `SaveFilePickerOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_exclude_accept_all_option()` instead."] + pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { + self.set_exclude_accept_all_option(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_id()` instead."] + pub fn id(&mut self, val: &str) -> &mut Self { + self.set_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_start_in()` instead."] + pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_start_in(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_types()` instead."] + pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_types(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_suggested_name()` instead."] pub fn suggested_name(&mut self, val: Option<&str>) -> &mut Self { - self.suggested_name_shim(val); + self.set_suggested_name(val); self } } diff --git a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs index a913bd85edc..367acaf5a16 100644 --- a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs +++ b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs @@ -14,14 +14,64 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SchedulerPostTaskOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "delay")] + pub fn get_delay(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &SchedulerPostTaskOptions, val: f64); + pub fn set_delay(this: &SchedulerPostTaskOptions, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "priority")] + pub fn get_priority(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &SchedulerPostTaskOptions, val: TaskPriority); + pub fn set_priority(this: &SchedulerPostTaskOptions, val: TaskPriority); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &SchedulerPostTaskOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &SchedulerPostTaskOptions, val: &AbortSignal); + pub fn set_signal(this: &SchedulerPostTaskOptions, val: &AbortSignal); } #[cfg(web_sys_unstable_apis)] impl SchedulerPostTaskOptions { @@ -37,38 +87,23 @@ impl SchedulerPostTaskOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `delay` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_delay()` instead."] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { - self.priority_shim(val); + self.set_priority(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs index b412d88ad14..ec98659e7e3 100644 --- a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs @@ -11,14 +11,41 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`*"] pub type ScrollIntoViewOptions; #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] + #[wasm_bindgen(method, getter = "behavior")] + pub fn get_behavior(this: &ScrollIntoViewOptions) -> Option; + #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollIntoViewOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollIntoViewOptions, val: ScrollBehavior); + #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Get the `block` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[wasm_bindgen(method, getter = "block")] + pub fn get_block(this: &ScrollIntoViewOptions) -> Option; #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Change the `block` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] #[wasm_bindgen(method, setter = "block")] - fn block_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + pub fn set_block(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Get the `inline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[wasm_bindgen(method, getter = "inline")] + pub fn get_inline(this: &ScrollIntoViewOptions) -> Option; + #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Change the `inline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] #[wasm_bindgen(method, setter = "inline")] - fn inline_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + pub fn set_inline(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); } impl ScrollIntoViewOptions { #[doc = "Construct a new `ScrollIntoViewOptions`."] @@ -30,27 +57,21 @@ impl ScrollIntoViewOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior(val); self } #[cfg(feature = "ScrollLogicalPosition")] - #[doc = "Change the `block` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[deprecated = "Use `set_block()` instead."] pub fn block(&mut self, val: ScrollLogicalPosition) -> &mut Self { - self.block_shim(val); + self.set_block(val); self } #[cfg(feature = "ScrollLogicalPosition")] - #[doc = "Change the `inline` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + #[deprecated = "Use `set_inline()` instead."] pub fn inline(&mut self, val: ScrollLogicalPosition) -> &mut Self { - self.inline_shim(val); + self.set_inline(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollOptions.rs b/crates/web-sys/src/features/gen_ScrollOptions.rs index 2357199aa50..0d960dadc0b 100644 --- a/crates/web-sys/src/features/gen_ScrollOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollOptions`*"] pub type ScrollOptions; #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] + #[wasm_bindgen(method, getter = "behavior")] + pub fn get_behavior(this: &ScrollOptions) -> Option; + #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollOptions, val: ScrollBehavior); } impl ScrollOptions { #[doc = "Construct a new `ScrollOptions`."] @@ -24,11 +33,9 @@ impl ScrollOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollToOptions.rs b/crates/web-sys/src/features/gen_ScrollToOptions.rs index d529c5913a8..497fdb92371 100644 --- a/crates/web-sys/src/features/gen_ScrollToOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollToOptions.rs @@ -11,12 +11,37 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] pub type ScrollToOptions; #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] + #[wasm_bindgen(method, getter = "behavior")] + pub fn get_behavior(this: &ScrollToOptions) -> Option; + #[cfg(feature = "ScrollBehavior")] + #[doc = "Change the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollToOptions, val: ScrollBehavior); + pub fn set_behavior(this: &ScrollToOptions, val: ScrollBehavior); + #[doc = "Get the `left` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[wasm_bindgen(method, getter = "left")] + pub fn get_left(this: &ScrollToOptions) -> Option; + #[doc = "Change the `left` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "left")] - fn left_shim(this: &ScrollToOptions, val: f64); + pub fn set_left(this: &ScrollToOptions, val: f64); + #[doc = "Get the `top` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[wasm_bindgen(method, getter = "top")] + pub fn get_top(this: &ScrollToOptions) -> Option; + #[doc = "Change the `top` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] #[wasm_bindgen(method, setter = "top")] - fn top_shim(this: &ScrollToOptions, val: f64); + pub fn set_top(this: &ScrollToOptions, val: f64); } impl ScrollToOptions { #[doc = "Construct a new `ScrollToOptions`."] @@ -28,25 +53,19 @@ impl ScrollToOptions { ret } #[cfg(feature = "ScrollBehavior")] - #[doc = "Change the `behavior` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] + #[deprecated = "Use `set_behavior()` instead."] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior(val); self } - #[doc = "Change the `left` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[deprecated = "Use `set_left()` instead."] pub fn left(&mut self, val: f64) -> &mut Self { - self.left_shim(val); + self.set_left(val); self } - #[doc = "Change the `top` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + #[deprecated = "Use `set_top()` instead."] pub fn top(&mut self, val: f64) -> &mut Self { - self.top_shim(val); + self.set_top(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs index 79eb87f27ec..1160275d1c0 100644 --- a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub type ScrollViewChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_bubbles(this: &ScrollViewChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_cancelable(this: &ScrollViewChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ScrollViewChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ScrollViewChangeEventInit, val: bool); + pub fn set_composed(this: &ScrollViewChangeEventInit, val: bool); #[cfg(feature = "ScrollState")] + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] + #[wasm_bindgen(method, getter = "state")] + pub fn get_state(this: &ScrollViewChangeEventInit) -> Option; + #[cfg(feature = "ScrollState")] + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &ScrollViewChangeEventInit, val: ScrollState); + pub fn set_state(this: &ScrollViewChangeEventInit, val: ScrollState); } impl ScrollViewChangeEventInit { #[doc = "Construct a new `ScrollViewChangeEventInit`."] @@ -29,33 +62,25 @@ impl ScrollViewChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "ScrollState")] - #[doc = "Change the `state` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] + #[deprecated = "Use `set_state()` instead."] pub fn state(&mut self, val: ScrollState) -> &mut Self { - self.state_shim(val); + self.set_state(val); self } } diff --git a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs index 2f86bc879fb..5176921a837 100644 --- a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs +++ b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs @@ -10,40 +10,163 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub type SecurityPolicyViolationEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_bubbles(this: &SecurityPolicyViolationEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_cancelable(this: &SecurityPolicyViolationEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SecurityPolicyViolationEventInit, val: bool); + pub fn set_composed(this: &SecurityPolicyViolationEventInit, val: bool); + #[doc = "Get the `blockedURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "blockedURI")] + pub fn get_blocked_uri(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `blockedURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "blockedURI")] - fn blocked_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_blocked_uri(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "columnNumber")] + pub fn get_column_number(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); + pub fn set_column_number(this: &SecurityPolicyViolationEventInit, val: i32); #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + #[doc = "Get the `disposition` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "disposition")] + pub fn get_disposition( + this: &SecurityPolicyViolationEventInit, + ) -> Option; + #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + #[doc = "Change the `disposition` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "disposition")] - fn disposition_shim( + pub fn set_disposition( this: &SecurityPolicyViolationEventInit, val: SecurityPolicyViolationEventDisposition, ); + #[doc = "Get the `documentURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "documentURI")] + pub fn get_document_uri(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `documentURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "documentURI")] - fn document_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_document_uri(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `effectiveDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "effectiveDirective")] + pub fn get_effective_directive(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `effectiveDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "effectiveDirective")] - fn effective_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_effective_directive(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "lineNumber")] + pub fn get_line_number(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); + pub fn set_line_number(this: &SecurityPolicyViolationEventInit, val: i32); + #[doc = "Get the `originalPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "originalPolicy")] + pub fn get_original_policy(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `originalPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "originalPolicy")] - fn original_policy_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_original_policy(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "referrer")] + pub fn get_referrer(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_referrer(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `sample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "sample")] + pub fn get_sample(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `sample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "sample")] - fn sample_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_sample(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `sourceFile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "sourceFile")] + pub fn get_source_file(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `sourceFile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "sourceFile")] - fn source_file_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_source_file(this: &SecurityPolicyViolationEventInit, val: &str); + #[doc = "Get the `statusCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "statusCode")] + pub fn get_status_code(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `statusCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "statusCode")] - fn status_code_shim(this: &SecurityPolicyViolationEventInit, val: u16); + pub fn set_status_code(this: &SecurityPolicyViolationEventInit, val: u16); + #[doc = "Get the `violatedDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[wasm_bindgen(method, getter = "violatedDirective")] + pub fn get_violated_directive(this: &SecurityPolicyViolationEventInit) -> Option; + #[doc = "Change the `violatedDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] #[wasm_bindgen(method, setter = "violatedDirective")] - fn violated_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); + pub fn set_violated_directive(this: &SecurityPolicyViolationEventInit, val: &str); } impl SecurityPolicyViolationEventInit { #[doc = "Construct a new `SecurityPolicyViolationEventInit`."] @@ -54,110 +177,80 @@ impl SecurityPolicyViolationEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `blockedURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_blocked_uri()` instead."] pub fn blocked_uri(&mut self, val: &str) -> &mut Self { - self.blocked_uri_shim(val); + self.set_blocked_uri(val); self } - #[doc = "Change the `columnNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_column_number()` instead."] pub fn column_number(&mut self, val: i32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number(val); self } #[cfg(feature = "SecurityPolicyViolationEventDisposition")] - #[doc = "Change the `disposition` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_disposition()` instead."] pub fn disposition(&mut self, val: SecurityPolicyViolationEventDisposition) -> &mut Self { - self.disposition_shim(val); + self.set_disposition(val); self } - #[doc = "Change the `documentURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_document_uri()` instead."] pub fn document_uri(&mut self, val: &str) -> &mut Self { - self.document_uri_shim(val); + self.set_document_uri(val); self } - #[doc = "Change the `effectiveDirective` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_effective_directive()` instead."] pub fn effective_directive(&mut self, val: &str) -> &mut Self { - self.effective_directive_shim(val); + self.set_effective_directive(val); self } - #[doc = "Change the `lineNumber` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_line_number()` instead."] pub fn line_number(&mut self, val: i32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number(val); self } - #[doc = "Change the `originalPolicy` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_original_policy()` instead."] pub fn original_policy(&mut self, val: &str) -> &mut Self { - self.original_policy_shim(val); + self.set_original_policy(val); self } - #[doc = "Change the `referrer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_referrer()` instead."] pub fn referrer(&mut self, val: &str) -> &mut Self { - self.referrer_shim(val); + self.set_referrer(val); self } - #[doc = "Change the `sample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_sample()` instead."] pub fn sample(&mut self, val: &str) -> &mut Self { - self.sample_shim(val); + self.set_sample(val); self } - #[doc = "Change the `sourceFile` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_source_file()` instead."] pub fn source_file(&mut self, val: &str) -> &mut Self { - self.source_file_shim(val); + self.set_source_file(val); self } - #[doc = "Change the `statusCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_status_code()` instead."] pub fn status_code(&mut self, val: u16) -> &mut Self { - self.status_code_shim(val); + self.set_status_code(val); self } - #[doc = "Change the `violatedDirective` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + #[deprecated = "Use `set_violated_directive()` instead."] pub fn violated_directive(&mut self, val: &str) -> &mut Self { - self.violated_directive_shim(val); + self.set_violated_directive(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialInputSignals.rs b/crates/web-sys/src/features/gen_SerialInputSignals.rs index bac6b8f7679..5cabc7a4ba5 100644 --- a/crates/web-sys/src/features/gen_SerialInputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialInputSignals.rs @@ -14,14 +14,78 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialInputSignals; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clearToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "clearToSend")] + pub fn get_clear_to_send(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `clearToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "clearToSend")] - fn clear_to_send_shim(this: &SerialInputSignals, val: bool); + pub fn set_clear_to_send(this: &SerialInputSignals, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataCarrierDetect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dataCarrierDetect")] + pub fn get_data_carrier_detect(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataCarrierDetect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataCarrierDetect")] - fn data_carrier_detect_shim(this: &SerialInputSignals, val: bool); + pub fn set_data_carrier_detect(this: &SerialInputSignals, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataSetReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dataSetReady")] + pub fn get_data_set_ready(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `dataSetReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "dataSetReady")] - fn data_set_ready_shim(this: &SerialInputSignals, val: bool); + pub fn set_data_set_ready(this: &SerialInputSignals, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ringIndicator` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "ringIndicator")] + pub fn get_ring_indicator(this: &SerialInputSignals) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `ringIndicator` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "ringIndicator")] - fn ring_indicator_shim(this: &SerialInputSignals, val: bool); + pub fn set_ring_indicator(this: &SerialInputSignals, val: bool); } #[cfg(web_sys_unstable_apis)] impl SerialInputSignals { @@ -46,47 +110,27 @@ impl SerialInputSignals { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `clearToSend` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_clear_to_send()` instead."] pub fn clear_to_send(&mut self, val: bool) -> &mut Self { - self.clear_to_send_shim(val); + self.set_clear_to_send(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataCarrierDetect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_carrier_detect()` instead."] pub fn data_carrier_detect(&mut self, val: bool) -> &mut Self { - self.data_carrier_detect_shim(val); + self.set_data_carrier_detect(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `dataSetReady` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_data_set_ready()` instead."] pub fn data_set_ready(&mut self, val: bool) -> &mut Self { - self.data_set_ready_shim(val); + self.set_data_set_ready(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `ringIndicator` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_ring_indicator()` instead."] pub fn ring_indicator(&mut self, val: bool) -> &mut Self { - self.ring_indicator_shim(val); + self.set_ring_indicator(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialOptions.rs b/crates/web-sys/src/features/gen_SerialOptions.rs index 02b78361511..a894c952f73 100644 --- a/crates/web-sys/src/features/gen_SerialOptions.rs +++ b/crates/web-sys/src/features/gen_SerialOptions.rs @@ -14,35 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialOptions; - #[wasm_bindgen(method, setter = "baudRate")] - fn baud_rate_shim(this: &SerialOptions, val: u32); - #[wasm_bindgen(method, setter = "bufferSize")] - fn buffer_size_shim(this: &SerialOptions, val: u32); - #[wasm_bindgen(method, setter = "dataBits")] - fn data_bits_shim(this: &SerialOptions, val: u8); - #[cfg(feature = "FlowControlType")] - #[wasm_bindgen(method, setter = "flowControl")] - fn flow_control_shim(this: &SerialOptions, val: FlowControlType); - #[cfg(feature = "ParityType")] - #[wasm_bindgen(method, setter = "parity")] - fn parity_shim(this: &SerialOptions, val: ParityType); - #[wasm_bindgen(method, setter = "stopBits")] - fn stop_bits_shim(this: &SerialOptions, val: u8); -} -#[cfg(web_sys_unstable_apis)] -impl SerialOptions { - #[doc = "Construct a new `SerialOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baudRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(baud_rate: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.baud_rate(baud_rate); - ret - } + #[wasm_bindgen(method, getter = "baudRate")] + pub fn get_baud_rate(this: &SerialOptions) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `baudRate` field of this object."] #[doc = ""] @@ -50,10 +30,17 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn baud_rate(&mut self, val: u32) -> &mut Self { - self.baud_rate_shim(val); - self - } + #[wasm_bindgen(method, setter = "baudRate")] + pub fn set_baud_rate(this: &SerialOptions, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bufferSize")] + pub fn get_buffer_size(this: &SerialOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bufferSize` field of this object."] #[doc = ""] @@ -61,10 +48,17 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn buffer_size(&mut self, val: u32) -> &mut Self { - self.buffer_size_shim(val); - self - } + #[wasm_bindgen(method, setter = "bufferSize")] + pub fn set_buffer_size(this: &SerialOptions, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dataBits")] + pub fn get_data_bits(this: &SerialOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `dataBits` field of this object."] #[doc = ""] @@ -72,10 +66,18 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn data_bits(&mut self, val: u8) -> &mut Self { - self.data_bits_shim(val); - self - } + #[wasm_bindgen(method, setter = "dataBits")] + pub fn set_data_bits(this: &SerialOptions, val: u8); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FlowControlType")] + #[doc = "Get the `flowControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FlowControlType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "flowControl")] + pub fn get_flow_control(this: &SerialOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FlowControlType")] #[doc = "Change the `flowControl` field of this object."] @@ -84,10 +86,18 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn flow_control(&mut self, val: FlowControlType) -> &mut Self { - self.flow_control_shim(val); - self - } + #[wasm_bindgen(method, setter = "flowControl")] + pub fn set_flow_control(this: &SerialOptions, val: FlowControlType); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ParityType")] + #[doc = "Get the `parity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ParityType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "parity")] + pub fn get_parity(this: &SerialOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "ParityType")] #[doc = "Change the `parity` field of this object."] @@ -96,10 +106,17 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn parity(&mut self, val: ParityType) -> &mut Self { - self.parity_shim(val); - self - } + #[wasm_bindgen(method, setter = "parity")] + pub fn set_parity(this: &SerialOptions, val: ParityType); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stopBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stopBits")] + pub fn get_stop_bits(this: &SerialOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stopBits` field of this object."] #[doc = ""] @@ -107,8 +124,59 @@ impl SerialOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "stopBits")] + pub fn set_stop_bits(this: &SerialOptions, val: u8); +} +#[cfg(web_sys_unstable_apis)] +impl SerialOptions { + #[doc = "Construct a new `SerialOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(baud_rate: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.baud_rate(baud_rate); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_baud_rate()` instead."] + pub fn baud_rate(&mut self, val: u32) -> &mut Self { + self.set_baud_rate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_buffer_size()` instead."] + pub fn buffer_size(&mut self, val: u32) -> &mut Self { + self.set_buffer_size(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_data_bits()` instead."] + pub fn data_bits(&mut self, val: u8) -> &mut Self { + self.set_data_bits(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FlowControlType")] + #[deprecated = "Use `set_flow_control()` instead."] + pub fn flow_control(&mut self, val: FlowControlType) -> &mut Self { + self.set_flow_control(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ParityType")] + #[deprecated = "Use `set_parity()` instead."] + pub fn parity(&mut self, val: ParityType) -> &mut Self { + self.set_parity(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stop_bits()` instead."] pub fn stop_bits(&mut self, val: u8) -> &mut Self { - self.stop_bits_shim(val); + self.set_stop_bits(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialOutputSignals.rs b/crates/web-sys/src/features/gen_SerialOutputSignals.rs index 73b3fb9764a..02a850f6621 100644 --- a/crates/web-sys/src/features/gen_SerialOutputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialOutputSignals.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialOutputSignals; - #[wasm_bindgen(method, setter = "break")] - fn break__shim(this: &SerialOutputSignals, val: bool); - #[wasm_bindgen(method, setter = "dataTerminalReady")] - fn data_terminal_ready_shim(this: &SerialOutputSignals, val: bool); - #[wasm_bindgen(method, setter = "requestToSend")] - fn request_to_send_shim(this: &SerialOutputSignals, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl SerialOutputSignals { - #[doc = "Construct a new `SerialOutputSignals`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `break` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "break")] + pub fn get_break(this: &SerialOutputSignals) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `break` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl SerialOutputSignals { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn break_(&mut self, val: bool) -> &mut Self { - self.break__shim(val); - self - } + #[wasm_bindgen(method, setter = "break")] + pub fn set_break(this: &SerialOutputSignals, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataTerminalReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "dataTerminalReady")] + pub fn get_data_terminal_ready(this: &SerialOutputSignals) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `dataTerminalReady` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl SerialOutputSignals { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn data_terminal_ready(&mut self, val: bool) -> &mut Self { - self.data_terminal_ready_shim(val); - self - } + #[wasm_bindgen(method, setter = "dataTerminalReady")] + pub fn set_data_terminal_ready(this: &SerialOutputSignals, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requestToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requestToSend")] + pub fn get_request_to_send(this: &SerialOutputSignals) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `requestToSend` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl SerialOutputSignals { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "requestToSend")] + pub fn set_request_to_send(this: &SerialOutputSignals, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl SerialOutputSignals { + #[doc = "Construct a new `SerialOutputSignals`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_break()` instead."] + pub fn break_(&mut self, val: bool) -> &mut Self { + self.set_break(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_data_terminal_ready()` instead."] + pub fn data_terminal_ready(&mut self, val: bool) -> &mut Self { + self.set_data_terminal_ready(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_request_to_send()` instead."] pub fn request_to_send(&mut self, val: bool) -> &mut Self { - self.request_to_send_shim(val); + self.set_request_to_send(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortFilter.rs b/crates/web-sys/src/features/gen_SerialPortFilter.rs index e1f876619bf..99fb46cb5dc 100644 --- a/crates/web-sys/src/features/gen_SerialPortFilter.rs +++ b/crates/web-sys/src/features/gen_SerialPortFilter.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortFilter; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usbProductId")] + pub fn get_usb_product_id(this: &SerialPortFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbProductId")] - fn usb_product_id_shim(this: &SerialPortFilter, val: u16); + pub fn set_usb_product_id(this: &SerialPortFilter, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usbVendorId")] + pub fn get_usb_vendor_id(this: &SerialPortFilter) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbVendorId")] - fn usb_vendor_id_shim(this: &SerialPortFilter, val: u16); + pub fn set_usb_vendor_id(this: &SerialPortFilter, val: u16); } #[cfg(web_sys_unstable_apis)] impl SerialPortFilter { @@ -33,25 +65,15 @@ impl SerialPortFilter { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbProductId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_product_id()` instead."] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { - self.usb_product_id_shim(val); + self.set_usb_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbVendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_vendor_id()` instead."] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { - self.usb_vendor_id_shim(val); + self.set_usb_vendor_id(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortInfo.rs b/crates/web-sys/src/features/gen_SerialPortInfo.rs index 90953d2923b..07f598e29e7 100644 --- a/crates/web-sys/src/features/gen_SerialPortInfo.rs +++ b/crates/web-sys/src/features/gen_SerialPortInfo.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortInfo; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usbProductId")] + pub fn get_usb_product_id(this: &SerialPortInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbProductId")] - fn usb_product_id_shim(this: &SerialPortInfo, val: u16); + pub fn set_usb_product_id(this: &SerialPortInfo, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "usbVendorId")] + pub fn get_usb_vendor_id(this: &SerialPortInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "usbVendorId")] - fn usb_vendor_id_shim(this: &SerialPortInfo, val: u16); + pub fn set_usb_vendor_id(this: &SerialPortInfo, val: u16); } #[cfg(web_sys_unstable_apis)] impl SerialPortInfo { @@ -33,25 +65,15 @@ impl SerialPortInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbProductId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_product_id()` instead."] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { - self.usb_product_id_shim(val); + self.set_usb_product_id(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `usbVendorId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_usb_vendor_id()` instead."] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { - self.usb_vendor_id_shim(val); + self.set_usb_vendor_id(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs index 34238c807e0..b00ff33fb63 100644 --- a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs +++ b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortRequestOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &SerialPortRequestOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl SerialPortRequestOptions { @@ -31,14 +47,9 @@ impl SerialPortRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters(val); self } } diff --git a/crates/web-sys/src/features/gen_ServerSocketOptions.rs b/crates/web-sys/src/features/gen_ServerSocketOptions.rs index 95133d8c0ef..803b7d63e11 100644 --- a/crates/web-sys/src/features/gen_ServerSocketOptions.rs +++ b/crates/web-sys/src/features/gen_ServerSocketOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`*"] pub type ServerSocketOptions; #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Get the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] + #[wasm_bindgen(method, getter = "binaryType")] + pub fn get_binary_type(this: &ServerSocketOptions) -> Option; + #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Change the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] #[wasm_bindgen(method, setter = "binaryType")] - fn binary_type_shim(this: &ServerSocketOptions, val: TcpSocketBinaryType); + pub fn set_binary_type(this: &ServerSocketOptions, val: TcpSocketBinaryType); } impl ServerSocketOptions { #[doc = "Construct a new `ServerSocketOptions`."] @@ -24,11 +33,9 @@ impl ServerSocketOptions { ret } #[cfg(feature = "TcpSocketBinaryType")] - #[doc = "Change the `binaryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] + #[deprecated = "Use `set_binary_type()` instead."] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { - self.binary_type_shim(val); + self.set_binary_type(val); self } } diff --git a/crates/web-sys/src/features/gen_ShadowRootInit.rs b/crates/web-sys/src/features/gen_ShadowRootInit.rs index e86cf54eebb..995f1541770 100644 --- a/crates/web-sys/src/features/gen_ShadowRootInit.rs +++ b/crates/web-sys/src/features/gen_ShadowRootInit.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`*"] pub type ShadowRootInit; #[cfg(feature = "ShadowRootMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &ShadowRootInit) -> ShadowRootMode; + #[cfg(feature = "ShadowRootMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &ShadowRootInit, val: ShadowRootMode); + pub fn set_mode(this: &ShadowRootInit, val: ShadowRootMode); } impl ShadowRootInit { #[cfg(feature = "ShadowRootMode")] @@ -26,11 +35,9 @@ impl ShadowRootInit { ret } #[cfg(feature = "ShadowRootMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: ShadowRootMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_ShareData.rs b/crates/web-sys/src/features/gen_ShareData.rs index 5a8110527a4..2f366fb822c 100644 --- a/crates/web-sys/src/features/gen_ShareData.rs +++ b/crates/web-sys/src/features/gen_ShareData.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub type ShareData; + #[doc = "Get the `files` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[wasm_bindgen(method, getter = "files")] + pub fn get_files(this: &ShareData) -> Option<::js_sys::Array>; + #[doc = "Change the `files` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "files")] - fn files_shim(this: &ShareData, val: &::wasm_bindgen::JsValue); + pub fn set_files(this: &ShareData, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `text` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[wasm_bindgen(method, getter = "text")] + pub fn get_text(this: &ShareData) -> Option; + #[doc = "Change the `text` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "text")] - fn text_shim(this: &ShareData, val: &str); + pub fn set_text(this: &ShareData, val: &str); + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[wasm_bindgen(method, getter = "title")] + pub fn get_title(this: &ShareData) -> Option; + #[doc = "Change the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &ShareData, val: &str); + pub fn set_title(this: &ShareData, val: &str); + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &ShareData) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &ShareData, val: &str); + pub fn set_url(this: &ShareData, val: &str); } impl ShareData { #[doc = "Construct a new `ShareData`."] @@ -28,32 +60,24 @@ impl ShareData { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `files` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_files()` instead."] pub fn files(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.files_shim(val); + self.set_files(val); self } - #[doc = "Change the `text` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_text()` instead."] pub fn text(&mut self, val: &str) -> &mut Self { - self.text_shim(val); + self.set_text(val); self } - #[doc = "Change the `title` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_title()` instead."] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } } diff --git a/crates/web-sys/src/features/gen_SignResponse.rs b/crates/web-sys/src/features/gen_SignResponse.rs index 22a21bb2d05..248bfe60512 100644 --- a/crates/web-sys/src/features/gen_SignResponse.rs +++ b/crates/web-sys/src/features/gen_SignResponse.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub type SignResponse; + #[doc = "Get the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[wasm_bindgen(method, getter = "clientData")] + pub fn get_client_data(this: &SignResponse) -> Option; + #[doc = "Change the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "clientData")] - fn client_data_shim(this: &SignResponse, val: &str); + pub fn set_client_data(this: &SignResponse, val: &str); + #[doc = "Get the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[wasm_bindgen(method, getter = "errorCode")] + pub fn get_error_code(this: &SignResponse) -> Option; + #[doc = "Change the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "errorCode")] - fn error_code_shim(this: &SignResponse, val: Option); + pub fn set_error_code(this: &SignResponse, val: Option); + #[doc = "Get the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[wasm_bindgen(method, getter = "errorMessage")] + pub fn get_error_message(this: &SignResponse) -> Option; + #[doc = "Change the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "errorMessage")] - fn error_message_shim(this: &SignResponse, val: Option<&str>); + pub fn set_error_message(this: &SignResponse, val: Option<&str>); + #[doc = "Get the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[wasm_bindgen(method, getter = "keyHandle")] + pub fn get_key_handle(this: &SignResponse) -> Option; + #[doc = "Change the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "keyHandle")] - fn key_handle_shim(this: &SignResponse, val: &str); + pub fn set_key_handle(this: &SignResponse, val: &str); + #[doc = "Get the `signatureData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[wasm_bindgen(method, getter = "signatureData")] + pub fn get_signature_data(this: &SignResponse) -> Option; + #[doc = "Change the `signatureData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] #[wasm_bindgen(method, setter = "signatureData")] - fn signature_data_shim(this: &SignResponse, val: &str); + pub fn set_signature_data(this: &SignResponse, val: &str); } impl SignResponse { #[doc = "Construct a new `SignResponse`."] @@ -30,39 +70,29 @@ impl SignResponse { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clientData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_client_data()` instead."] pub fn client_data(&mut self, val: &str) -> &mut Self { - self.client_data_shim(val); + self.set_client_data(val); self } - #[doc = "Change the `errorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_error_code()` instead."] pub fn error_code(&mut self, val: Option) -> &mut Self { - self.error_code_shim(val); + self.set_error_code(val); self } - #[doc = "Change the `errorMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_error_message()` instead."] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { - self.error_message_shim(val); + self.set_error_message(val); self } - #[doc = "Change the `keyHandle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_key_handle()` instead."] pub fn key_handle(&mut self, val: &str) -> &mut Self { - self.key_handle_shim(val); + self.set_key_handle(val); self } - #[doc = "Change the `signatureData` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + #[deprecated = "Use `set_signature_data()` instead."] pub fn signature_data(&mut self, val: &str) -> &mut Self { - self.signature_data_shim(val); + self.set_signature_data(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketElement.rs b/crates/web-sys/src/features/gen_SocketElement.rs index cb535c7c6d2..e1270b6a247 100644 --- a/crates/web-sys/src/features/gen_SocketElement.rs +++ b/crates/web-sys/src/features/gen_SocketElement.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub type SocketElement; + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "active")] + pub fn get_active(this: &SocketElement) -> Option; + #[doc = "Change the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &SocketElement, val: bool); + pub fn set_active(this: &SocketElement, val: bool); + #[doc = "Get the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "host")] + pub fn get_host(this: &SocketElement) -> Option; + #[doc = "Change the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "host")] - fn host_shim(this: &SocketElement, val: &str); + pub fn set_host(this: &SocketElement, val: &str); + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "port")] + pub fn get_port(this: &SocketElement) -> Option; + #[doc = "Change the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &SocketElement, val: u32); + pub fn set_port(this: &SocketElement, val: u32); + #[doc = "Get the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "received")] + pub fn get_received(this: &SocketElement) -> Option; + #[doc = "Change the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "received")] - fn received_shim(this: &SocketElement, val: f64); + pub fn set_received(this: &SocketElement, val: f64); + #[doc = "Get the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "sent")] + pub fn get_sent(this: &SocketElement) -> Option; + #[doc = "Change the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "sent")] - fn sent_shim(this: &SocketElement, val: f64); + pub fn set_sent(this: &SocketElement, val: f64); + #[doc = "Get the `tcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[wasm_bindgen(method, getter = "tcp")] + pub fn get_tcp(this: &SocketElement) -> Option; + #[doc = "Change the `tcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] #[wasm_bindgen(method, setter = "tcp")] - fn tcp_shim(this: &SocketElement, val: bool); + pub fn set_tcp(this: &SocketElement, val: bool); } impl SocketElement { #[doc = "Construct a new `SocketElement`."] @@ -32,46 +80,34 @@ impl SocketElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `active` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_active()` instead."] pub fn active(&mut self, val: bool) -> &mut Self { - self.active_shim(val); + self.set_active(val); self } - #[doc = "Change the `host` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_host()` instead."] pub fn host(&mut self, val: &str) -> &mut Self { - self.host_shim(val); + self.set_host(val); self } - #[doc = "Change the `port` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_port()` instead."] pub fn port(&mut self, val: u32) -> &mut Self { - self.port_shim(val); + self.set_port(val); self } - #[doc = "Change the `received` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_received()` instead."] pub fn received(&mut self, val: f64) -> &mut Self { - self.received_shim(val); + self.set_received(val); self } - #[doc = "Change the `sent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_sent()` instead."] pub fn sent(&mut self, val: f64) -> &mut Self { - self.sent_shim(val); + self.set_sent(val); self } - #[doc = "Change the `tcp` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + #[deprecated = "Use `set_tcp()` instead."] pub fn tcp(&mut self, val: bool) -> &mut Self { - self.tcp_shim(val); + self.set_tcp(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketOptions.rs b/crates/web-sys/src/features/gen_SocketOptions.rs index 18c27e4f0d5..3d99e6381c8 100644 --- a/crates/web-sys/src/features/gen_SocketOptions.rs +++ b/crates/web-sys/src/features/gen_SocketOptions.rs @@ -11,10 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] pub type SocketOptions; #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Get the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] + #[wasm_bindgen(method, getter = "binaryType")] + pub fn get_binary_type(this: &SocketOptions) -> Option; + #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Change the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] #[wasm_bindgen(method, setter = "binaryType")] - fn binary_type_shim(this: &SocketOptions, val: TcpSocketBinaryType); + pub fn set_binary_type(this: &SocketOptions, val: TcpSocketBinaryType); + #[doc = "Get the `useSecureTransport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] + #[wasm_bindgen(method, getter = "useSecureTransport")] + pub fn get_use_secure_transport(this: &SocketOptions) -> Option; + #[doc = "Change the `useSecureTransport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] #[wasm_bindgen(method, setter = "useSecureTransport")] - fn use_secure_transport_shim(this: &SocketOptions, val: bool); + pub fn set_use_secure_transport(this: &SocketOptions, val: bool); } impl SocketOptions { #[doc = "Construct a new `SocketOptions`."] @@ -26,18 +43,14 @@ impl SocketOptions { ret } #[cfg(feature = "TcpSocketBinaryType")] - #[doc = "Change the `binaryType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] + #[deprecated = "Use `set_binary_type()` instead."] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { - self.binary_type_shim(val); + self.set_binary_type(val); self } - #[doc = "Change the `useSecureTransport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] + #[deprecated = "Use `set_use_secure_transport()` instead."] pub fn use_secure_transport(&mut self, val: bool) -> &mut Self { - self.use_secure_transport_shim(val); + self.set_use_secure_transport(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketsDict.rs b/crates/web-sys/src/features/gen_SocketsDict.rs index 8623ebb50a4..6a892687cae 100644 --- a/crates/web-sys/src/features/gen_SocketsDict.rs +++ b/crates/web-sys/src/features/gen_SocketsDict.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] pub type SocketsDict; + #[doc = "Get the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[wasm_bindgen(method, getter = "received")] + pub fn get_received(this: &SocketsDict) -> Option; + #[doc = "Change the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "received")] - fn received_shim(this: &SocketsDict, val: f64); + pub fn set_received(this: &SocketsDict, val: f64); + #[doc = "Get the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[wasm_bindgen(method, getter = "sent")] + pub fn get_sent(this: &SocketsDict) -> Option; + #[doc = "Change the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "sent")] - fn sent_shim(this: &SocketsDict, val: f64); + pub fn set_sent(this: &SocketsDict, val: f64); + #[doc = "Get the `sockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[wasm_bindgen(method, getter = "sockets")] + pub fn get_sockets(this: &SocketsDict) -> Option<::js_sys::Array>; + #[doc = "Change the `sockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] #[wasm_bindgen(method, setter = "sockets")] - fn sockets_shim(this: &SocketsDict, val: &::wasm_bindgen::JsValue); + pub fn set_sockets(this: &SocketsDict, val: &::wasm_bindgen::JsValue); } impl SocketsDict { #[doc = "Construct a new `SocketsDict`."] @@ -26,25 +50,19 @@ impl SocketsDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `received` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_received()` instead."] pub fn received(&mut self, val: f64) -> &mut Self { - self.received_shim(val); + self.set_received(val); self } - #[doc = "Change the `sent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_sent()` instead."] pub fn sent(&mut self, val: f64) -> &mut Self { - self.sent_shim(val); + self.set_sent(val); self } - #[doc = "Change the `sockets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + #[deprecated = "Use `set_sockets()` instead."] pub fn sockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.sockets_shim(val); + self.set_sockets(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs index 6781c3939d3..bc5e60a4e8e 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub type SpeechRecognitionErrorInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_bubbles(this: &SpeechRecognitionErrorInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_cancelable(this: &SpeechRecognitionErrorInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechRecognitionErrorInit, val: bool); + pub fn set_composed(this: &SpeechRecognitionErrorInit, val: bool); + #[cfg(feature = "SpeechRecognitionErrorCode")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &SpeechRecognitionErrorInit) -> Option; #[cfg(feature = "SpeechRecognitionErrorCode")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); + pub fn set_error(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[wasm_bindgen(method, getter = "message")] + pub fn get_message(this: &SpeechRecognitionErrorInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &SpeechRecognitionErrorInit, val: &str); + pub fn set_message(this: &SpeechRecognitionErrorInit, val: &str); } impl SpeechRecognitionErrorInit { #[doc = "Construct a new `SpeechRecognitionErrorInit`."] @@ -31,40 +72,30 @@ impl SpeechRecognitionErrorInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "SpeechRecognitionErrorCode")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: SpeechRecognitionErrorCode) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs index 8db88b7b80f..dcd41c8616f 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs @@ -10,22 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub type SpeechRecognitionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_bubbles(this: &SpeechRecognitionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_cancelable(this: &SpeechRecognitionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechRecognitionEventInit, val: bool); + pub fn set_composed(this: &SpeechRecognitionEventInit, val: bool); #[cfg(feature = "Document")] + #[doc = "Get the `emma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "emma")] + pub fn get_emma(this: &SpeechRecognitionEventInit) -> Option; + #[cfg(feature = "Document")] + #[doc = "Change the `emma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "emma")] - fn emma_shim(this: &SpeechRecognitionEventInit, val: Option<&Document>); + pub fn set_emma(this: &SpeechRecognitionEventInit, val: Option<&Document>); + #[doc = "Get the `interpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "interpretation")] + pub fn get_interpretation(this: &SpeechRecognitionEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `interpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "interpretation")] - fn interpretation_shim(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_interpretation(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `resultIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[wasm_bindgen(method, getter = "resultIndex")] + pub fn get_result_index(this: &SpeechRecognitionEventInit) -> Option; + #[doc = "Change the `resultIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] #[wasm_bindgen(method, setter = "resultIndex")] - fn result_index_shim(this: &SpeechRecognitionEventInit, val: u32); + pub fn set_result_index(this: &SpeechRecognitionEventInit, val: u32); + #[cfg(feature = "SpeechRecognitionResultList")] + #[doc = "Get the `results` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] + #[wasm_bindgen(method, getter = "results")] + pub fn get_results(this: &SpeechRecognitionEventInit) -> Option; #[cfg(feature = "SpeechRecognitionResultList")] + #[doc = "Change the `results` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] #[wasm_bindgen(method, setter = "results")] - fn results_shim(this: &SpeechRecognitionEventInit, val: Option<&SpeechRecognitionResultList>); + pub fn set_results( + this: &SpeechRecognitionEventInit, + val: Option<&SpeechRecognitionResultList>, + ); } impl SpeechRecognitionEventInit { #[doc = "Construct a new `SpeechRecognitionEventInit`."] @@ -36,55 +97,41 @@ impl SpeechRecognitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "Document")] - #[doc = "Change the `emma` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_emma()` instead."] pub fn emma(&mut self, val: Option<&Document>) -> &mut Self { - self.emma_shim(val); + self.set_emma(val); self } - #[doc = "Change the `interpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_interpretation()` instead."] pub fn interpretation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interpretation_shim(val); + self.set_interpretation(val); self } - #[doc = "Change the `resultIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + #[deprecated = "Use `set_result_index()` instead."] pub fn result_index(&mut self, val: u32) -> &mut Self { - self.result_index_shim(val); + self.set_result_index(val); self } #[cfg(feature = "SpeechRecognitionResultList")] - #[doc = "Change the `results` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] + #[deprecated = "Use `set_results()` instead."] pub fn results(&mut self, val: Option<&SpeechRecognitionResultList>) -> &mut Self { - self.results_shim(val); + self.set_results(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs index 54fe4337561..5ffb6825037 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs @@ -10,26 +10,100 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub type SpeechSynthesisErrorEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_bubbles(this: &SpeechSynthesisErrorEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_cancelable(this: &SpeechSynthesisErrorEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + pub fn set_composed(this: &SpeechSynthesisErrorEventInit, val: bool); + #[doc = "Get the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "charIndex")] + pub fn get_char_index(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "charIndex")] - fn char_index_shim(this: &SpeechSynthesisErrorEventInit, val: u32); + pub fn set_char_index(this: &SpeechSynthesisErrorEventInit, val: u32); + #[doc = "Get the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "charLength")] + pub fn get_char_length(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "charLength")] - fn char_length_shim(this: &SpeechSynthesisErrorEventInit, val: Option); + pub fn set_char_length(this: &SpeechSynthesisErrorEventInit, val: Option); + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "elapsedTime")] + pub fn get_elapsed_time(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &SpeechSynthesisErrorEventInit, val: f32); + pub fn set_elapsed_time(this: &SpeechSynthesisErrorEventInit, val: f32); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &SpeechSynthesisErrorEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &SpeechSynthesisErrorEventInit, val: &str); + pub fn set_name(this: &SpeechSynthesisErrorEventInit, val: &str); + #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Get the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] + #[wasm_bindgen(method, getter = "utterance")] + pub fn get_utterance(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Change the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] #[wasm_bindgen(method, setter = "utterance")] - fn utterance_shim(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); + pub fn set_utterance(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); + #[cfg(feature = "SpeechSynthesisErrorCode")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisErrorCode; #[cfg(feature = "SpeechSynthesisErrorCode")] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); + pub fn set_error(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); } impl SpeechSynthesisErrorEventInit { #[cfg(all( @@ -46,69 +120,51 @@ impl SpeechSynthesisErrorEventInit { ret.error(error); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `charIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_char_index()` instead."] pub fn char_index(&mut self, val: u32) -> &mut Self { - self.char_index_shim(val); + self.set_char_index(val); self } - #[doc = "Change the `charLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_char_length()` instead."] pub fn char_length(&mut self, val: Option) -> &mut Self { - self.char_length_shim(val); + self.set_char_length(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] - #[doc = "Change the `utterance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] + #[deprecated = "Use `set_utterance()` instead."] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { - self.utterance_shim(val); + self.set_utterance(val); self } #[cfg(feature = "SpeechSynthesisErrorCode")] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: SpeechSynthesisErrorCode) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs index 3726366ad20..e3f4eed47a7 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs @@ -10,23 +10,88 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub type SpeechSynthesisEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_bubbles(this: &SpeechSynthesisEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_cancelable(this: &SpeechSynthesisEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechSynthesisEventInit, val: bool); + pub fn set_composed(this: &SpeechSynthesisEventInit, val: bool); + #[doc = "Get the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "charIndex")] + pub fn get_char_index(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "charIndex")] - fn char_index_shim(this: &SpeechSynthesisEventInit, val: u32); + pub fn set_char_index(this: &SpeechSynthesisEventInit, val: u32); + #[doc = "Get the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "charLength")] + pub fn get_char_length(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "charLength")] - fn char_length_shim(this: &SpeechSynthesisEventInit, val: Option); + pub fn set_char_length(this: &SpeechSynthesisEventInit, val: Option); + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "elapsedTime")] + pub fn get_elapsed_time(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &SpeechSynthesisEventInit, val: f32); + pub fn set_elapsed_time(this: &SpeechSynthesisEventInit, val: f32); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &SpeechSynthesisEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &SpeechSynthesisEventInit, val: &str); + pub fn set_name(this: &SpeechSynthesisEventInit, val: &str); + #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Get the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] + #[wasm_bindgen(method, getter = "utterance")] + pub fn get_utterance(this: &SpeechSynthesisEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Change the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] #[wasm_bindgen(method, setter = "utterance")] - fn utterance_shim(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); + pub fn set_utterance(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); } impl SpeechSynthesisEventInit { #[cfg(feature = "SpeechSynthesisUtterance")] @@ -39,61 +104,45 @@ impl SpeechSynthesisEventInit { ret.utterance(utterance); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `charIndex` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_char_index()` instead."] pub fn char_index(&mut self, val: u32) -> &mut Self { - self.char_index_shim(val); + self.set_char_index(val); self } - #[doc = "Change the `charLength` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_char_length()` instead."] pub fn char_length(&mut self, val: Option) -> &mut Self { - self.char_length_shim(val); + self.set_char_length(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] - #[doc = "Change the `utterance` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] + #[deprecated = "Use `set_utterance()` instead."] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { - self.utterance_shim(val); + self.set_utterance(val); self } } diff --git a/crates/web-sys/src/features/gen_StereoPannerOptions.rs b/crates/web-sys/src/features/gen_StereoPannerOptions.rs index 792a024f70c..3a56b27f013 100644 --- a/crates/web-sys/src/features/gen_StereoPannerOptions.rs +++ b/crates/web-sys/src/features/gen_StereoPannerOptions.rs @@ -10,16 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] pub type StereoPannerOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &StereoPannerOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &StereoPannerOptions, val: u32); + pub fn set_channel_count(this: &StereoPannerOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &StereoPannerOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &StereoPannerOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &StereoPannerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &StereoPannerOptions) -> Option; #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &StereoPannerOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &StereoPannerOptions, val: ChannelInterpretation); + #[doc = "Get the `pan` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[wasm_bindgen(method, getter = "pan")] + pub fn get_pan(this: &StereoPannerOptions) -> Option; + #[doc = "Change the `pan` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] #[wasm_bindgen(method, setter = "pan")] - fn pan_shim(this: &StereoPannerOptions, val: f32); + pub fn set_pan(this: &StereoPannerOptions, val: f32); } impl StereoPannerOptions { #[doc = "Construct a new `StereoPannerOptions`."] @@ -30,34 +64,26 @@ impl StereoPannerOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `pan` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + #[deprecated = "Use `set_pan()` instead."] pub fn pan(&mut self, val: f32) -> &mut Self { - self.pan_shim(val); + self.set_pan(val); self } } diff --git a/crates/web-sys/src/features/gen_StorageEstimate.rs b/crates/web-sys/src/features/gen_StorageEstimate.rs index 242dc68778c..bd360574641 100644 --- a/crates/web-sys/src/features/gen_StorageEstimate.rs +++ b/crates/web-sys/src/features/gen_StorageEstimate.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] pub type StorageEstimate; + #[doc = "Get the `quota` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[wasm_bindgen(method, getter = "quota")] + pub fn get_quota(this: &StorageEstimate) -> Option; + #[doc = "Change the `quota` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, setter = "quota")] - fn quota_shim(this: &StorageEstimate, val: f64); + pub fn set_quota(this: &StorageEstimate, val: f64); + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[wasm_bindgen(method, getter = "usage")] + pub fn get_usage(this: &StorageEstimate) -> Option; + #[doc = "Change the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &StorageEstimate, val: f64); + pub fn set_usage(this: &StorageEstimate, val: f64); } impl StorageEstimate { #[doc = "Construct a new `StorageEstimate`."] @@ -24,18 +40,14 @@ impl StorageEstimate { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `quota` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[deprecated = "Use `set_quota()` instead."] pub fn quota(&mut self, val: f64) -> &mut Self { - self.quota_shim(val); + self.set_quota(val); self } - #[doc = "Change the `usage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: f64) -> &mut Self { - self.usage_shim(val); + self.set_usage(val); self } } diff --git a/crates/web-sys/src/features/gen_StorageEventInit.rs b/crates/web-sys/src/features/gen_StorageEventInit.rs index 5c42540d6d6..51db6561485 100644 --- a/crates/web-sys/src/features/gen_StorageEventInit.rs +++ b/crates/web-sys/src/features/gen_StorageEventInit.rs @@ -10,23 +10,88 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub type StorageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &StorageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StorageEventInit, val: bool); + pub fn set_bubbles(this: &StorageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &StorageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StorageEventInit, val: bool); + pub fn set_cancelable(this: &StorageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &StorageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StorageEventInit, val: bool); + pub fn set_composed(this: &StorageEventInit, val: bool); + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "key")] + pub fn get_key(this: &StorageEventInit) -> Option; + #[doc = "Change the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &StorageEventInit, val: Option<&str>); + pub fn set_key(this: &StorageEventInit, val: Option<&str>); + #[doc = "Get the `newValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "newValue")] + pub fn get_new_value(this: &StorageEventInit) -> Option; + #[doc = "Change the `newValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "newValue")] - fn new_value_shim(this: &StorageEventInit, val: Option<&str>); + pub fn set_new_value(this: &StorageEventInit, val: Option<&str>); + #[doc = "Get the `oldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "oldValue")] + pub fn get_old_value(this: &StorageEventInit) -> Option; + #[doc = "Change the `oldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "oldValue")] - fn old_value_shim(this: &StorageEventInit, val: Option<&str>); + pub fn set_old_value(this: &StorageEventInit, val: Option<&str>); + #[cfg(feature = "Storage")] + #[doc = "Get the `storageArea` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "storageArea")] + pub fn get_storage_area(this: &StorageEventInit) -> Option; #[cfg(feature = "Storage")] + #[doc = "Change the `storageArea` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] #[wasm_bindgen(method, setter = "storageArea")] - fn storage_area_shim(this: &StorageEventInit, val: Option<&Storage>); + pub fn set_storage_area(this: &StorageEventInit, val: Option<&Storage>); + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[wasm_bindgen(method, getter = "url")] + pub fn get_url(this: &StorageEventInit) -> Option; + #[doc = "Change the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &StorageEventInit, val: &str); + pub fn set_url(this: &StorageEventInit, val: &str); } impl StorageEventInit { #[doc = "Construct a new `StorageEventInit`."] @@ -37,61 +102,45 @@ impl StorageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `key` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_key()` instead."] pub fn key(&mut self, val: Option<&str>) -> &mut Self { - self.key_shim(val); + self.set_key(val); self } - #[doc = "Change the `newValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_new_value()` instead."] pub fn new_value(&mut self, val: Option<&str>) -> &mut Self { - self.new_value_shim(val); + self.set_new_value(val); self } - #[doc = "Change the `oldValue` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_old_value()` instead."] pub fn old_value(&mut self, val: Option<&str>) -> &mut Self { - self.old_value_shim(val); + self.set_old_value(val); self } #[cfg(feature = "Storage")] - #[doc = "Change the `storageArea` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] + #[deprecated = "Use `set_storage_area()` instead."] pub fn storage_area(&mut self, val: Option<&Storage>) -> &mut Self { - self.storage_area_shim(val); + self.set_storage_area(val); self } - #[doc = "Change the `url` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + #[deprecated = "Use `set_url()` instead."] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url(val); self } } diff --git a/crates/web-sys/src/features/gen_StreamPipeOptions.rs b/crates/web-sys/src/features/gen_StreamPipeOptions.rs index d9c02acc745..a23579d144b 100644 --- a/crates/web-sys/src/features/gen_StreamPipeOptions.rs +++ b/crates/web-sys/src/features/gen_StreamPipeOptions.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] pub type StreamPipeOptions; + #[doc = "Get the `preventAbort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[wasm_bindgen(method, getter = "preventAbort")] + pub fn get_prevent_abort(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventAbort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventAbort")] - fn prevent_abort_shim(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_abort(this: &StreamPipeOptions, val: bool); + #[doc = "Get the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[wasm_bindgen(method, getter = "preventCancel")] + pub fn get_prevent_cancel(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventCancel")] - fn prevent_cancel_shim(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_cancel(this: &StreamPipeOptions, val: bool); + #[doc = "Get the `preventClose` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[wasm_bindgen(method, getter = "preventClose")] + pub fn get_prevent_close(this: &StreamPipeOptions) -> Option; + #[doc = "Change the `preventClose` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "preventClose")] - fn prevent_close_shim(this: &StreamPipeOptions, val: bool); + pub fn set_prevent_close(this: &StreamPipeOptions, val: bool); #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &StreamPipeOptions) -> Option; + #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &StreamPipeOptions, val: &AbortSignal); + pub fn set_signal(this: &StreamPipeOptions, val: &AbortSignal); } impl StreamPipeOptions { #[doc = "Construct a new `StreamPipeOptions`."] @@ -29,33 +62,25 @@ impl StreamPipeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `preventAbort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_abort()` instead."] pub fn prevent_abort(&mut self, val: bool) -> &mut Self { - self.prevent_abort_shim(val); + self.set_prevent_abort(val); self } - #[doc = "Change the `preventCancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_cancel()` instead."] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { - self.prevent_cancel_shim(val); + self.set_prevent_cancel(val); self } - #[doc = "Change the `preventClose` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + #[deprecated = "Use `set_prevent_close()` instead."] pub fn prevent_close(&mut self, val: bool) -> &mut Self { - self.prevent_close_shim(val); + self.set_prevent_close(val); self } #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs index cf84e4807e9..9366e1e7345 100644 --- a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs @@ -10,18 +10,60 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub type StyleRuleChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleRuleChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleRuleChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &StyleRuleChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleRuleChangeEventInit, val: bool); + pub fn set_composed(this: &StyleRuleChangeEventInit, val: bool); + #[cfg(feature = "CssRule")] + #[doc = "Get the `rule` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] + #[wasm_bindgen(method, getter = "rule")] + pub fn get_rule(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssRule")] + #[doc = "Change the `rule` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "rule")] - fn rule_shim(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); + pub fn set_rule(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] + #[wasm_bindgen(method, getter = "stylesheet")] + pub fn get_stylesheet(this: &StyleRuleChangeEventInit) -> Option; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); + pub fn set_stylesheet(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleRuleChangeEventInit { #[doc = "Construct a new `StyleRuleChangeEventInit`."] @@ -32,41 +74,31 @@ impl StyleRuleChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "CssRule")] - #[doc = "Change the `rule` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_rule()` instead."] pub fn rule(&mut self, val: Option<&CssRule>) -> &mut Self { - self.rule_shim(val); + self.set_rule(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs index 547d1124cb7..70aecd5ed6f 100644 --- a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs @@ -10,17 +10,59 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub type StyleSheetApplicableStateChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_composed(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[doc = "Get the `applicable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[wasm_bindgen(method, getter = "applicable")] + pub fn get_applicable(this: &StyleSheetApplicableStateChangeEventInit) -> Option; + #[doc = "Change the `applicable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "applicable")] - fn applicable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + pub fn set_applicable(this: &StyleSheetApplicableStateChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] + #[wasm_bindgen(method, getter = "stylesheet")] + pub fn get_stylesheet(this: &StyleSheetApplicableStateChangeEventInit) + -> Option; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim( + pub fn set_stylesheet( this: &StyleSheetApplicableStateChangeEventInit, val: Option<&CssStyleSheet>, ); @@ -34,40 +76,30 @@ impl StyleSheetApplicableStateChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `applicable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_applicable()` instead."] pub fn applicable(&mut self, val: bool) -> &mut Self { - self.applicable_shim(val); + self.set_applicable(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs index 4aeb6e4fc4a..a0d658a71fd 100644 --- a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub type StyleSheetChangeEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_bubbles(this: &StyleSheetChangeEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_cancelable(this: &StyleSheetChangeEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_composed(this: &StyleSheetChangeEventInit, val: bool); + #[doc = "Get the `documentSheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[wasm_bindgen(method, getter = "documentSheet")] + pub fn get_document_sheet(this: &StyleSheetChangeEventInit) -> Option; + #[doc = "Change the `documentSheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "documentSheet")] - fn document_sheet_shim(this: &StyleSheetChangeEventInit, val: bool); + pub fn set_document_sheet(this: &StyleSheetChangeEventInit, val: bool); #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] + #[wasm_bindgen(method, getter = "stylesheet")] + pub fn get_stylesheet(this: &StyleSheetChangeEventInit) -> Option; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Change the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); + pub fn set_stylesheet(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); } impl StyleSheetChangeEventInit { #[doc = "Construct a new `StyleSheetChangeEventInit`."] @@ -31,40 +72,30 @@ impl StyleSheetChangeEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `documentSheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_document_sheet()` instead."] pub fn document_sheet(&mut self, val: bool) -> &mut Self { - self.document_sheet_shim(val); + self.set_document_sheet(val); self } #[cfg(feature = "CssStyleSheet")] - #[doc = "Change the `stylesheet` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] + #[deprecated = "Use `set_stylesheet()` instead."] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet(val); self } } diff --git a/crates/web-sys/src/features/gen_SubmitEventInit.rs b/crates/web-sys/src/features/gen_SubmitEventInit.rs index 1fa2555e874..4d954d50e3f 100644 --- a/crates/web-sys/src/features/gen_SubmitEventInit.rs +++ b/crates/web-sys/src/features/gen_SubmitEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] pub type SubmitEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &SubmitEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SubmitEventInit, val: bool); + pub fn set_bubbles(this: &SubmitEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &SubmitEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SubmitEventInit, val: bool); + pub fn set_cancelable(this: &SubmitEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &SubmitEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SubmitEventInit, val: bool); + pub fn set_composed(this: &SubmitEventInit, val: bool); #[cfg(feature = "HtmlElement")] + #[doc = "Get the `submitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] + #[wasm_bindgen(method, getter = "submitter")] + pub fn get_submitter(this: &SubmitEventInit) -> Option; + #[cfg(feature = "HtmlElement")] + #[doc = "Change the `submitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] #[wasm_bindgen(method, setter = "submitter")] - fn submitter_shim(this: &SubmitEventInit, val: Option<&HtmlElement>); + pub fn set_submitter(this: &SubmitEventInit, val: Option<&HtmlElement>); } impl SubmitEventInit { #[doc = "Construct a new `SubmitEventInit`."] @@ -29,33 +62,25 @@ impl SubmitEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "HtmlElement")] - #[doc = "Change the `submitter` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] + #[deprecated = "Use `set_submitter()` instead."] pub fn submitter(&mut self, val: Option<&HtmlElement>) -> &mut Self { - self.submitter_shim(val); + self.set_submitter(val); self } } diff --git a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs index f48c035565d..84f9d00dd6a 100644 --- a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs +++ b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SvcOutputMetadata; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `temporalLayerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "temporalLayerId")] + pub fn get_temporal_layer_id(this: &SvcOutputMetadata) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `temporalLayerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "temporalLayerId")] - fn temporal_layer_id_shim(this: &SvcOutputMetadata, val: u32); + pub fn set_temporal_layer_id(this: &SvcOutputMetadata, val: u32); } #[cfg(web_sys_unstable_apis)] impl SvcOutputMetadata { @@ -31,14 +47,9 @@ impl SvcOutputMetadata { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `temporalLayerId` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_temporal_layer_id()` instead."] pub fn temporal_layer_id(&mut self, val: u32) -> &mut Self { - self.temporal_layer_id_shim(val); + self.set_temporal_layer_id(val); self } } diff --git a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs index 4d83aa30982..fc9141bf2fc 100644 --- a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs +++ b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub type SvgBoundingBoxOptions; + #[doc = "Get the `clipped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[wasm_bindgen(method, getter = "clipped")] + pub fn get_clipped(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `clipped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "clipped")] - fn clipped_shim(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_clipped(this: &SvgBoundingBoxOptions, val: bool); + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[wasm_bindgen(method, getter = "fill")] + pub fn get_fill(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_fill(this: &SvgBoundingBoxOptions, val: bool); + #[doc = "Get the `markers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[wasm_bindgen(method, getter = "markers")] + pub fn get_markers(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `markers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "markers")] - fn markers_shim(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_markers(this: &SvgBoundingBoxOptions, val: bool); + #[doc = "Get the `stroke` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[wasm_bindgen(method, getter = "stroke")] + pub fn get_stroke(this: &SvgBoundingBoxOptions) -> Option; + #[doc = "Change the `stroke` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] #[wasm_bindgen(method, setter = "stroke")] - fn stroke_shim(this: &SvgBoundingBoxOptions, val: bool); + pub fn set_stroke(this: &SvgBoundingBoxOptions, val: bool); } impl SvgBoundingBoxOptions { #[doc = "Construct a new `SvgBoundingBoxOptions`."] @@ -28,32 +60,24 @@ impl SvgBoundingBoxOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `clipped` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_clipped()` instead."] pub fn clipped(&mut self, val: bool) -> &mut Self { - self.clipped_shim(val); + self.set_clipped(val); self } - #[doc = "Change the `fill` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_fill()` instead."] pub fn fill(&mut self, val: bool) -> &mut Self { - self.fill_shim(val); + self.set_fill(val); self } - #[doc = "Change the `markers` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_markers()` instead."] pub fn markers(&mut self, val: bool) -> &mut Self { - self.markers_shim(val); + self.set_markers(val); self } - #[doc = "Change the `stroke` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + #[deprecated = "Use `set_stroke()` instead."] pub fn stroke(&mut self, val: bool) -> &mut Self { - self.stroke_shim(val); + self.set_stroke(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskControllerInit.rs b/crates/web-sys/src/features/gen_TaskControllerInit.rs index 87fb5cbf035..71b2c5a0e46 100644 --- a/crates/web-sys/src/features/gen_TaskControllerInit.rs +++ b/crates/web-sys/src/features/gen_TaskControllerInit.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskControllerInit; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "priority")] + pub fn get_priority(this: &TaskControllerInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &TaskControllerInit, val: TaskPriority); + pub fn set_priority(this: &TaskControllerInit, val: TaskPriority); } #[cfg(web_sys_unstable_apis)] impl TaskControllerInit { @@ -33,14 +50,9 @@ impl TaskControllerInit { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { - self.priority_shim(val); + self.set_priority(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs index c2fc50429fa..9180af22954 100644 --- a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskPriorityChangeEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_bubbles(this: &TaskPriorityChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_cancelable(this: &TaskPriorityChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TaskPriorityChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TaskPriorityChangeEventInit, val: bool); + pub fn set_composed(this: &TaskPriorityChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `previousPriority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "previousPriority")] + pub fn get_previous_priority(this: &TaskPriorityChangeEventInit) -> TaskPriority; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] + #[doc = "Change the `previousPriority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "previousPriority")] - fn previous_priority_shim(this: &TaskPriorityChangeEventInit, val: TaskPriority); + pub fn set_previous_priority(this: &TaskPriorityChangeEventInit, val: TaskPriority); } #[cfg(web_sys_unstable_apis)] impl TaskPriorityChangeEventInit { @@ -40,48 +105,28 @@ impl TaskPriorityChangeEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - #[doc = "Change the `previousPriority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_previous_priority()` instead."] pub fn previous_priority(&mut self, val: TaskPriority) -> &mut Self { - self.previous_priority_shim(val); + self.set_previous_priority(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs index 99b837c6d73..61fc8bc9de0 100644 --- a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs +++ b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskSignalAnyInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "priority")] + pub fn get_priority(this: &TaskSignalAnyInit) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); + pub fn set_priority(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl TaskSignalAnyInit { @@ -31,14 +47,9 @@ impl TaskSignalAnyInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `priority` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_priority()` instead."] pub fn priority(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.priority_shim(val); + self.set_priority(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs index 480782339ae..1021c266f49 100644 --- a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] pub type TcpServerSocketEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpServerSocketEventInit, val: bool); + pub fn set_bubbles(this: &TcpServerSocketEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpServerSocketEventInit, val: bool); + pub fn set_cancelable(this: &TcpServerSocketEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TcpServerSocketEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpServerSocketEventInit, val: bool); + pub fn set_composed(this: &TcpServerSocketEventInit, val: bool); #[cfg(feature = "TcpSocket")] + #[doc = "Get the `socket` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] + #[wasm_bindgen(method, getter = "socket")] + pub fn get_socket(this: &TcpServerSocketEventInit) -> Option; + #[cfg(feature = "TcpSocket")] + #[doc = "Change the `socket` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] #[wasm_bindgen(method, setter = "socket")] - fn socket_shim(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); + pub fn set_socket(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); } impl TcpServerSocketEventInit { #[doc = "Construct a new `TcpServerSocketEventInit`."] @@ -29,33 +62,25 @@ impl TcpServerSocketEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(feature = "TcpSocket")] - #[doc = "Change the `socket` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] + #[deprecated = "Use `set_socket()` instead."] pub fn socket(&mut self, val: Option<&TcpSocket>) -> &mut Self { - self.socket_shim(val); + self.set_socket(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs index 8ce673d4787..63c13ff0397 100644 --- a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub type TcpSocketErrorEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_bubbles(this: &TcpSocketErrorEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_cancelable(this: &TcpSocketErrorEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpSocketErrorEventInit, val: bool); + pub fn set_composed(this: &TcpSocketErrorEventInit, val: bool); + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[wasm_bindgen(method, getter = "message")] + pub fn get_message(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &TcpSocketErrorEventInit, val: &str); + pub fn set_message(this: &TcpSocketErrorEventInit, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &TcpSocketErrorEventInit) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &TcpSocketErrorEventInit, val: &str); + pub fn set_name(this: &TcpSocketErrorEventInit, val: &str); } impl TcpSocketErrorEventInit { #[doc = "Construct a new `TcpSocketErrorEventInit`."] @@ -30,39 +70,29 @@ impl TcpSocketErrorEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `message` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_message()` instead."] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs index c73323b4dde..5980130f25a 100644 --- a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub type TcpSocketEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpSocketEventInit, val: bool); + pub fn set_bubbles(this: &TcpSocketEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpSocketEventInit, val: bool); + pub fn set_cancelable(this: &TcpSocketEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TcpSocketEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpSocketEventInit, val: bool); + pub fn set_composed(this: &TcpSocketEventInit, val: bool); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &TcpSocketEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); } impl TcpSocketEventInit { #[doc = "Construct a new `TcpSocketEventInit`."] @@ -28,32 +60,24 @@ impl TcpSocketEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } } diff --git a/crates/web-sys/src/features/gen_TextDecodeOptions.rs b/crates/web-sys/src/features/gen_TextDecodeOptions.rs index ad37701b64f..e9176c5d9e8 100644 --- a/crates/web-sys/src/features/gen_TextDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecodeOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] pub type TextDecodeOptions; + #[doc = "Get the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] + #[wasm_bindgen(method, getter = "stream")] + pub fn get_stream(this: &TextDecodeOptions) -> Option; + #[doc = "Change the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] #[wasm_bindgen(method, setter = "stream")] - fn stream_shim(this: &TextDecodeOptions, val: bool); + pub fn set_stream(this: &TextDecodeOptions, val: bool); } impl TextDecodeOptions { #[doc = "Construct a new `TextDecodeOptions`."] @@ -22,11 +30,9 @@ impl TextDecodeOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `stream` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] + #[deprecated = "Use `set_stream()` instead."] pub fn stream(&mut self, val: bool) -> &mut Self { - self.stream_shim(val); + self.set_stream(val); self } } diff --git a/crates/web-sys/src/features/gen_TextDecoderOptions.rs b/crates/web-sys/src/features/gen_TextDecoderOptions.rs index ece2e78e5df..1ca8079c0cd 100644 --- a/crates/web-sys/src/features/gen_TextDecoderOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecoderOptions.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] pub type TextDecoderOptions; + #[doc = "Get the `fatal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] + #[wasm_bindgen(method, getter = "fatal")] + pub fn get_fatal(this: &TextDecoderOptions) -> Option; + #[doc = "Change the `fatal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] #[wasm_bindgen(method, setter = "fatal")] - fn fatal_shim(this: &TextDecoderOptions, val: bool); + pub fn set_fatal(this: &TextDecoderOptions, val: bool); } impl TextDecoderOptions { #[doc = "Construct a new `TextDecoderOptions`."] @@ -22,11 +30,9 @@ impl TextDecoderOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `fatal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] + #[deprecated = "Use `set_fatal()` instead."] pub fn fatal(&mut self, val: bool) -> &mut Self { - self.fatal_shim(val); + self.set_fatal(val); self } } diff --git a/crates/web-sys/src/features/gen_TouchEventInit.rs b/crates/web-sys/src/features/gen_TouchEventInit.rs index 4cec29ce0b4..18c280b631f 100644 --- a/crates/web-sys/src/features/gen_TouchEventInit.rs +++ b/crates/web-sys/src/features/gen_TouchEventInit.rs @@ -10,49 +10,218 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub type TouchEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TouchEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TouchEventInit, val: bool); + pub fn set_bubbles(this: &TouchEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TouchEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TouchEventInit, val: bool); + pub fn set_cancelable(this: &TouchEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TouchEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TouchEventInit, val: bool); + pub fn set_composed(this: &TouchEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &TouchEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &TouchEventInit, val: i32); + pub fn set_detail(this: &TouchEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &TouchEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &TouchEventInit, val: Option<&Window>); + pub fn set_view(this: &TouchEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &TouchEventInit, val: bool); + pub fn set_alt_key(this: &TouchEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &TouchEventInit, val: bool); + pub fn set_ctrl_key(this: &TouchEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &TouchEventInit, val: bool); + pub fn set_meta_key(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_fn(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_num_lock(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_os(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_symbol(this: &TouchEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &TouchEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &TouchEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &TouchEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &TouchEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &TouchEventInit, val: bool); + pub fn set_shift_key(this: &TouchEventInit, val: bool); + #[doc = "Get the `changedTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "changedTouches")] + pub fn get_changed_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `changedTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "changedTouches")] - fn changed_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_changed_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `targetTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "targetTouches")] + pub fn get_target_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `targetTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "targetTouches")] - fn target_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_target_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `touches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[wasm_bindgen(method, getter = "touches")] + pub fn get_touches(this: &TouchEventInit) -> Option<::js_sys::Array>; + #[doc = "Change the `touches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] #[wasm_bindgen(method, setter = "touches")] - fn touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_touches(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); } impl TouchEventInit { #[doc = "Construct a new `TouchEventInit`."] @@ -63,152 +232,110 @@ impl TouchEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `changedTouches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_changed_touches()` instead."] pub fn changed_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.changed_touches_shim(val); + self.set_changed_touches(val); self } - #[doc = "Change the `targetTouches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_target_touches()` instead."] pub fn target_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.target_touches_shim(val); + self.set_target_touches(val); self } - #[doc = "Change the `touches` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + #[deprecated = "Use `set_touches()` instead."] pub fn touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.touches_shim(val); + self.set_touches(val); self } } diff --git a/crates/web-sys/src/features/gen_TouchInit.rs b/crates/web-sys/src/features/gen_TouchInit.rs index a9c5cc1745a..37c8a7ab01d 100644 --- a/crates/web-sys/src/features/gen_TouchInit.rs +++ b/crates/web-sys/src/features/gen_TouchInit.rs @@ -10,31 +10,128 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub type TouchInit; + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "clientX")] + pub fn get_client_x(this: &TouchInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &TouchInit, val: i32); + pub fn set_client_x(this: &TouchInit, val: i32); + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "clientY")] + pub fn get_client_y(this: &TouchInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &TouchInit, val: i32); + pub fn set_client_y(this: &TouchInit, val: i32); + #[doc = "Get the `force` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "force")] + pub fn get_force(this: &TouchInit) -> Option; + #[doc = "Change the `force` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "force")] - fn force_shim(this: &TouchInit, val: f32); + pub fn set_force(this: &TouchInit, val: f32); + #[doc = "Get the `identifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "identifier")] + pub fn get_identifier(this: &TouchInit) -> i32; + #[doc = "Change the `identifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "identifier")] - fn identifier_shim(this: &TouchInit, val: i32); + pub fn set_identifier(this: &TouchInit, val: i32); + #[doc = "Get the `pageX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "pageX")] + pub fn get_page_x(this: &TouchInit) -> Option; + #[doc = "Change the `pageX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "pageX")] - fn page_x_shim(this: &TouchInit, val: i32); + pub fn set_page_x(this: &TouchInit, val: i32); + #[doc = "Get the `pageY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "pageY")] + pub fn get_page_y(this: &TouchInit) -> Option; + #[doc = "Change the `pageY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "pageY")] - fn page_y_shim(this: &TouchInit, val: i32); + pub fn set_page_y(this: &TouchInit, val: i32); + #[doc = "Get the `radiusX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "radiusX")] + pub fn get_radius_x(this: &TouchInit) -> Option; + #[doc = "Change the `radiusX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "radiusX")] - fn radius_x_shim(this: &TouchInit, val: f32); + pub fn set_radius_x(this: &TouchInit, val: f32); + #[doc = "Get the `radiusY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "radiusY")] + pub fn get_radius_y(this: &TouchInit) -> Option; + #[doc = "Change the `radiusY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "radiusY")] - fn radius_y_shim(this: &TouchInit, val: f32); + pub fn set_radius_y(this: &TouchInit, val: f32); + #[doc = "Get the `rotationAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "rotationAngle")] + pub fn get_rotation_angle(this: &TouchInit) -> Option; + #[doc = "Change the `rotationAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "rotationAngle")] - fn rotation_angle_shim(this: &TouchInit, val: f32); + pub fn set_rotation_angle(this: &TouchInit, val: f32); + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "screenX")] + pub fn get_screen_x(this: &TouchInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &TouchInit, val: i32); + pub fn set_screen_x(this: &TouchInit, val: i32); + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[wasm_bindgen(method, getter = "screenY")] + pub fn get_screen_y(this: &TouchInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &TouchInit, val: i32); + pub fn set_screen_y(this: &TouchInit, val: i32); #[cfg(feature = "EventTarget")] + #[doc = "Get the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] + #[wasm_bindgen(method, getter = "target")] + pub fn get_target(this: &TouchInit) -> EventTarget; + #[cfg(feature = "EventTarget")] + #[doc = "Change the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] #[wasm_bindgen(method, setter = "target")] - fn target_shim(this: &TouchInit, val: &EventTarget); + pub fn set_target(this: &TouchInit, val: &EventTarget); } impl TouchInit { #[cfg(feature = "EventTarget")] @@ -48,89 +145,65 @@ impl TouchInit { ret.target(target); ret } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y(val); self } - #[doc = "Change the `force` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_force()` instead."] pub fn force(&mut self, val: f32) -> &mut Self { - self.force_shim(val); + self.set_force(val); self } - #[doc = "Change the `identifier` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_identifier()` instead."] pub fn identifier(&mut self, val: i32) -> &mut Self { - self.identifier_shim(val); + self.set_identifier(val); self } - #[doc = "Change the `pageX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_page_x()` instead."] pub fn page_x(&mut self, val: i32) -> &mut Self { - self.page_x_shim(val); + self.set_page_x(val); self } - #[doc = "Change the `pageY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_page_y()` instead."] pub fn page_y(&mut self, val: i32) -> &mut Self { - self.page_y_shim(val); + self.set_page_y(val); self } - #[doc = "Change the `radiusX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_radius_x()` instead."] pub fn radius_x(&mut self, val: f32) -> &mut Self { - self.radius_x_shim(val); + self.set_radius_x(val); self } - #[doc = "Change the `radiusY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_radius_y()` instead."] pub fn radius_y(&mut self, val: f32) -> &mut Self { - self.radius_y_shim(val); + self.set_radius_y(val); self } - #[doc = "Change the `rotationAngle` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_rotation_angle()` instead."] pub fn rotation_angle(&mut self, val: f32) -> &mut Self { - self.rotation_angle_shim(val); + self.set_rotation_angle(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `target` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] + #[deprecated = "Use `set_target()` instead."] pub fn target(&mut self, val: &EventTarget) -> &mut Self { - self.target_shim(val); + self.set_target(val); self } } diff --git a/crates/web-sys/src/features/gen_TrackEventInit.rs b/crates/web-sys/src/features/gen_TrackEventInit.rs index 18ede672b91..8097517d952 100644 --- a/crates/web-sys/src/features/gen_TrackEventInit.rs +++ b/crates/web-sys/src/features/gen_TrackEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub type TrackEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TrackEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TrackEventInit, val: bool); + pub fn set_bubbles(this: &TrackEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TrackEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TrackEventInit, val: bool); + pub fn set_cancelable(this: &TrackEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TrackEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TrackEventInit, val: bool); + pub fn set_composed(this: &TrackEventInit, val: bool); + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[wasm_bindgen(method, getter = "track")] + pub fn get_track(this: &TrackEventInit) -> Option<::js_sys::Object>; + #[doc = "Change the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &TrackEventInit, val: Option<&::js_sys::Object>); + pub fn set_track(this: &TrackEventInit, val: Option<&::js_sys::Object>); } impl TrackEventInit { #[doc = "Construct a new `TrackEventInit`."] @@ -28,32 +60,24 @@ impl TrackEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `track` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + #[deprecated = "Use `set_track()` instead."] pub fn track(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.track_shim(val); + self.set_track(val); self } } diff --git a/crates/web-sys/src/features/gen_Transformer.rs b/crates/web-sys/src/features/gen_Transformer.rs index 02cb29200b1..77d6965fa3f 100644 --- a/crates/web-sys/src/features/gen_Transformer.rs +++ b/crates/web-sys/src/features/gen_Transformer.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub type Transformer; + #[doc = "Get the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[wasm_bindgen(method, getter = "flush")] + pub fn get_flush(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "flush")] - fn flush_shim(this: &Transformer, val: &::js_sys::Function); + pub fn set_flush(this: &Transformer, val: &::js_sys::Function); + #[doc = "Get the `readableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[wasm_bindgen(method, getter = "readableType")] + pub fn get_readable_type(this: &Transformer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `readableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "readableType")] - fn readable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); + pub fn set_readable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[wasm_bindgen(method, getter = "start")] + pub fn get_start(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &Transformer, val: &::js_sys::Function); + pub fn set_start(this: &Transformer, val: &::js_sys::Function); + #[doc = "Get the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[wasm_bindgen(method, getter = "transform")] + pub fn get_transform(this: &Transformer) -> Option<::js_sys::Function>; + #[doc = "Change the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "transform")] - fn transform_shim(this: &Transformer, val: &::js_sys::Function); + pub fn set_transform(this: &Transformer, val: &::js_sys::Function); + #[doc = "Get the `writableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[wasm_bindgen(method, getter = "writableType")] + pub fn get_writable_type(this: &Transformer) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `writableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] #[wasm_bindgen(method, setter = "writableType")] - fn writable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); + pub fn set_writable_type(this: &Transformer, val: &::wasm_bindgen::JsValue); } impl Transformer { #[doc = "Construct a new `Transformer`."] @@ -30,39 +70,29 @@ impl Transformer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `flush` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_flush()` instead."] pub fn flush(&mut self, val: &::js_sys::Function) -> &mut Self { - self.flush_shim(val); + self.set_flush(val); self } - #[doc = "Change the `readableType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_readable_type()` instead."] pub fn readable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.readable_type_shim(val); + self.set_readable_type(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start(val); self } - #[doc = "Change the `transform` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_transform()` instead."] pub fn transform(&mut self, val: &::js_sys::Function) -> &mut Self { - self.transform_shim(val); + self.set_transform(val); self } - #[doc = "Change the `writableType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + #[deprecated = "Use `set_writable_type()` instead."] pub fn writable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.writable_type_shim(val); + self.set_writable_type(val); self } } diff --git a/crates/web-sys/src/features/gen_TransitionEventInit.rs b/crates/web-sys/src/features/gen_TransitionEventInit.rs index a6d000fd7b6..b3ede75c465 100644 --- a/crates/web-sys/src/features/gen_TransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_TransitionEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub type TransitionEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &TransitionEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TransitionEventInit, val: bool); + pub fn set_bubbles(this: &TransitionEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &TransitionEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TransitionEventInit, val: bool); + pub fn set_cancelable(this: &TransitionEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &TransitionEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TransitionEventInit, val: bool); + pub fn set_composed(this: &TransitionEventInit, val: bool); + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "elapsedTime")] + pub fn get_elapsed_time(this: &TransitionEventInit) -> Option; + #[doc = "Change the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &TransitionEventInit, val: f32); + pub fn set_elapsed_time(this: &TransitionEventInit, val: f32); + #[doc = "Get the `propertyName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "propertyName")] + pub fn get_property_name(this: &TransitionEventInit) -> Option; + #[doc = "Change the `propertyName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "propertyName")] - fn property_name_shim(this: &TransitionEventInit, val: &str); + pub fn set_property_name(this: &TransitionEventInit, val: &str); + #[doc = "Get the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[wasm_bindgen(method, getter = "pseudoElement")] + pub fn get_pseudo_element(this: &TransitionEventInit) -> Option; + #[doc = "Change the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] #[wasm_bindgen(method, setter = "pseudoElement")] - fn pseudo_element_shim(this: &TransitionEventInit, val: &str); + pub fn set_pseudo_element(this: &TransitionEventInit, val: &str); } impl TransitionEventInit { #[doc = "Construct a new `TransitionEventInit`."] @@ -32,46 +80,34 @@ impl TransitionEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `elapsedTime` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_elapsed_time()` instead."] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time(val); self } - #[doc = "Change the `propertyName` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_property_name()` instead."] pub fn property_name(&mut self, val: &str) -> &mut Self { - self.property_name_shim(val); + self.set_property_name(val); self } - #[doc = "Change the `pseudoElement` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + #[deprecated = "Use `set_pseudo_element()` instead."] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { - self.pseudo_element_shim(val); + self.set_pseudo_element(val); self } } diff --git a/crates/web-sys/src/features/gen_TreeCellInfo.rs b/crates/web-sys/src/features/gen_TreeCellInfo.rs index 6d46b866721..75327d1ee85 100644 --- a/crates/web-sys/src/features/gen_TreeCellInfo.rs +++ b/crates/web-sys/src/features/gen_TreeCellInfo.rs @@ -10,10 +10,26 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] pub type TreeCellInfo; + #[doc = "Get the `childElt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[wasm_bindgen(method, getter = "childElt")] + pub fn get_child_elt(this: &TreeCellInfo) -> Option; + #[doc = "Change the `childElt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, setter = "childElt")] - fn child_elt_shim(this: &TreeCellInfo, val: &str); + pub fn set_child_elt(this: &TreeCellInfo, val: &str); + #[doc = "Get the `row` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[wasm_bindgen(method, getter = "row")] + pub fn get_row(this: &TreeCellInfo) -> Option; + #[doc = "Change the `row` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] #[wasm_bindgen(method, setter = "row")] - fn row_shim(this: &TreeCellInfo, val: i32); + pub fn set_row(this: &TreeCellInfo, val: i32); } impl TreeCellInfo { #[doc = "Construct a new `TreeCellInfo`."] @@ -24,18 +40,14 @@ impl TreeCellInfo { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `childElt` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[deprecated = "Use `set_child_elt()` instead."] pub fn child_elt(&mut self, val: &str) -> &mut Self { - self.child_elt_shim(val); + self.set_child_elt(val); self } - #[doc = "Change the `row` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + #[deprecated = "Use `set_row()` instead."] pub fn row(&mut self, val: i32) -> &mut Self { - self.row_shim(val); + self.set_row(val); self } } diff --git a/crates/web-sys/src/features/gen_U2fClientData.rs b/crates/web-sys/src/features/gen_U2fClientData.rs index e633e97f4d6..a67f45af5d5 100644 --- a/crates/web-sys/src/features/gen_U2fClientData.rs +++ b/crates/web-sys/src/features/gen_U2fClientData.rs @@ -10,12 +10,36 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] pub type U2fClientData; + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[wasm_bindgen(method, getter = "challenge")] + pub fn get_challenge(this: &U2fClientData) -> Option; + #[doc = "Change the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &U2fClientData, val: &str); + pub fn set_challenge(this: &U2fClientData, val: &str); + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[wasm_bindgen(method, getter = "origin")] + pub fn get_origin(this: &U2fClientData) -> Option; + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &U2fClientData, val: &str); + pub fn set_origin(this: &U2fClientData, val: &str); + #[doc = "Get the `typ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[wasm_bindgen(method, getter = "typ")] + pub fn get_typ(this: &U2fClientData) -> Option; + #[doc = "Change the `typ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] #[wasm_bindgen(method, setter = "typ")] - fn typ_shim(this: &U2fClientData, val: &str); + pub fn set_typ(this: &U2fClientData, val: &str); } impl U2fClientData { #[doc = "Construct a new `U2fClientData`."] @@ -26,25 +50,19 @@ impl U2fClientData { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `challenge` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_challenge()` instead."] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge(val); self } - #[doc = "Change the `origin` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_origin()` instead."] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin(val); self } - #[doc = "Change the `typ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + #[deprecated = "Use `set_typ()` instead."] pub fn typ(&mut self, val: &str) -> &mut Self { - self.typ_shim(val); + self.set_typ(val); self } } diff --git a/crates/web-sys/src/features/gen_ULongRange.rs b/crates/web-sys/src/features/gen_ULongRange.rs index f365b9378f1..acf295622ee 100644 --- a/crates/web-sys/src/features/gen_ULongRange.rs +++ b/crates/web-sys/src/features/gen_ULongRange.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ULongRange; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "max")] + pub fn get_max(this: &ULongRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &ULongRange, val: u32); + pub fn set_max(this: &ULongRange, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "min")] + pub fn get_min(this: &ULongRange) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &ULongRange, val: u32); + pub fn set_min(this: &ULongRange, val: u32); } #[cfg(web_sys_unstable_apis)] impl ULongRange { @@ -33,25 +65,15 @@ impl ULongRange { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `max` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_max()` instead."] pub fn max(&mut self, val: u32) -> &mut Self { - self.max_shim(val); + self.set_max(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `min` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ULongRange`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_min()` instead."] pub fn min(&mut self, val: u32) -> &mut Self { - self.min_shim(val); + self.set_min(val); self } } diff --git a/crates/web-sys/src/features/gen_UaDataValues.rs b/crates/web-sys/src/features/gen_UaDataValues.rs index bf16447c90d..02cc3e761c1 100644 --- a/crates/web-sys/src/features/gen_UaDataValues.rs +++ b/crates/web-sys/src/features/gen_UaDataValues.rs @@ -14,40 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UaDataValues; - #[wasm_bindgen(method, setter = "architecture")] - fn architecture_shim(this: &UaDataValues, val: &str); - #[wasm_bindgen(method, setter = "bitness")] - fn bitness_shim(this: &UaDataValues, val: &str); - #[wasm_bindgen(method, setter = "brands")] - fn brands_shim(this: &UaDataValues, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "formFactors")] - fn form_factors_shim(this: &UaDataValues, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "fullVersionList")] - fn full_version_list_shim(this: &UaDataValues, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "mobile")] - fn mobile_shim(this: &UaDataValues, val: bool); - #[wasm_bindgen(method, setter = "model")] - fn model_shim(this: &UaDataValues, val: &str); - #[wasm_bindgen(method, setter = "platform")] - fn platform_shim(this: &UaDataValues, val: &str); - #[wasm_bindgen(method, setter = "platformVersion")] - fn platform_version_shim(this: &UaDataValues, val: &str); - #[wasm_bindgen(method, setter = "wow64")] - fn wow64_shim(this: &UaDataValues, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl UaDataValues { - #[doc = "Construct a new `UaDataValues`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `architecture` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "architecture")] + pub fn get_architecture(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `architecture` field of this object."] #[doc = ""] @@ -55,10 +30,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn architecture(&mut self, val: &str) -> &mut Self { - self.architecture_shim(val); - self - } + #[wasm_bindgen(method, setter = "architecture")] + pub fn set_architecture(this: &UaDataValues, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bitness` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bitness")] + pub fn get_bitness(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bitness` field of this object."] #[doc = ""] @@ -66,10 +48,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bitness(&mut self, val: &str) -> &mut Self { - self.bitness_shim(val); - self - } + #[wasm_bindgen(method, setter = "bitness")] + pub fn set_bitness(this: &UaDataValues, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `brands` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "brands")] + pub fn get_brands(this: &UaDataValues) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `brands` field of this object."] #[doc = ""] @@ -77,10 +66,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn brands(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.brands_shim(val); - self - } + #[wasm_bindgen(method, setter = "brands")] + pub fn set_brands(this: &UaDataValues, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `formFactors` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "formFactors")] + pub fn get_form_factors(this: &UaDataValues) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `formFactors` field of this object."] #[doc = ""] @@ -88,10 +84,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn form_factors(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.form_factors_shim(val); - self - } + #[wasm_bindgen(method, setter = "formFactors")] + pub fn set_form_factors(this: &UaDataValues, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `fullVersionList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "fullVersionList")] + pub fn get_full_version_list(this: &UaDataValues) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `fullVersionList` field of this object."] #[doc = ""] @@ -99,10 +102,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn full_version_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.full_version_list_shim(val); - self - } + #[wasm_bindgen(method, setter = "fullVersionList")] + pub fn set_full_version_list(this: &UaDataValues, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mobile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mobile")] + pub fn get_mobile(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mobile` field of this object."] #[doc = ""] @@ -110,10 +120,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mobile(&mut self, val: bool) -> &mut Self { - self.mobile_shim(val); - self - } + #[wasm_bindgen(method, setter = "mobile")] + pub fn set_mobile(this: &UaDataValues, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `model` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "model")] + pub fn get_model(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `model` field of this object."] #[doc = ""] @@ -121,10 +138,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn model(&mut self, val: &str) -> &mut Self { - self.model_shim(val); - self - } + #[wasm_bindgen(method, setter = "model")] + pub fn set_model(this: &UaDataValues, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `platform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "platform")] + pub fn get_platform(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `platform` field of this object."] #[doc = ""] @@ -132,10 +156,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn platform(&mut self, val: &str) -> &mut Self { - self.platform_shim(val); - self - } + #[wasm_bindgen(method, setter = "platform")] + pub fn set_platform(this: &UaDataValues, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `platformVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "platformVersion")] + pub fn get_platform_version(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `platformVersion` field of this object."] #[doc = ""] @@ -143,10 +174,17 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn platform_version(&mut self, val: &str) -> &mut Self { - self.platform_version_shim(val); - self - } + #[wasm_bindgen(method, setter = "platformVersion")] + pub fn set_platform_version(this: &UaDataValues, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `wow64` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "wow64")] + pub fn get_wow64(this: &UaDataValues) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `wow64` field of this object."] #[doc = ""] @@ -154,8 +192,80 @@ impl UaDataValues { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "wow64")] + pub fn set_wow64(this: &UaDataValues, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl UaDataValues { + #[doc = "Construct a new `UaDataValues`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_architecture()` instead."] + pub fn architecture(&mut self, val: &str) -> &mut Self { + self.set_architecture(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bitness()` instead."] + pub fn bitness(&mut self, val: &str) -> &mut Self { + self.set_bitness(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_brands()` instead."] + pub fn brands(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_brands(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_form_factors()` instead."] + pub fn form_factors(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_form_factors(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_full_version_list()` instead."] + pub fn full_version_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_full_version_list(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mobile()` instead."] + pub fn mobile(&mut self, val: bool) -> &mut Self { + self.set_mobile(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_model()` instead."] + pub fn model(&mut self, val: &str) -> &mut Self { + self.set_model(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_platform()` instead."] + pub fn platform(&mut self, val: &str) -> &mut Self { + self.set_platform(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_platform_version()` instead."] + pub fn platform_version(&mut self, val: &str) -> &mut Self { + self.set_platform_version(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_wow64()` instead."] pub fn wow64(&mut self, val: bool) -> &mut Self { - self.wow64_shim(val); + self.set_wow64(val); self } } diff --git a/crates/web-sys/src/features/gen_UaLowEntropyJson.rs b/crates/web-sys/src/features/gen_UaLowEntropyJson.rs index d6c1363ff14..4a099e10946 100644 --- a/crates/web-sys/src/features/gen_UaLowEntropyJson.rs +++ b/crates/web-sys/src/features/gen_UaLowEntropyJson.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UaLowEntropyJson; - #[wasm_bindgen(method, setter = "brands")] - fn brands_shim(this: &UaLowEntropyJson, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "mobile")] - fn mobile_shim(this: &UaLowEntropyJson, val: bool); - #[wasm_bindgen(method, setter = "platform")] - fn platform_shim(this: &UaLowEntropyJson, val: &str); -} -#[cfg(web_sys_unstable_apis)] -impl UaLowEntropyJson { - #[doc = "Construct a new `UaLowEntropyJson`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `brands` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "brands")] + pub fn get_brands(this: &UaLowEntropyJson) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `brands` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl UaLowEntropyJson { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn brands(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.brands_shim(val); - self - } + #[wasm_bindgen(method, setter = "brands")] + pub fn set_brands(this: &UaLowEntropyJson, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mobile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mobile")] + pub fn get_mobile(this: &UaLowEntropyJson) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `mobile` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl UaLowEntropyJson { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn mobile(&mut self, val: bool) -> &mut Self { - self.mobile_shim(val); - self - } + #[wasm_bindgen(method, setter = "mobile")] + pub fn set_mobile(this: &UaLowEntropyJson, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `platform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "platform")] + pub fn get_platform(this: &UaLowEntropyJson) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `platform` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl UaLowEntropyJson { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "platform")] + pub fn set_platform(this: &UaLowEntropyJson, val: &str); +} +#[cfg(web_sys_unstable_apis)] +impl UaLowEntropyJson { + #[doc = "Construct a new `UaLowEntropyJson`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_brands()` instead."] + pub fn brands(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_brands(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_mobile()` instead."] + pub fn mobile(&mut self, val: bool) -> &mut Self { + self.set_mobile(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_platform()` instead."] pub fn platform(&mut self, val: &str) -> &mut Self { - self.platform_shim(val); + self.set_platform(val); self } } diff --git a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs index 201113bd26f..7d8c01cf491 100644 --- a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub type UdpMessageEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UdpMessageEventInit, val: bool); + pub fn set_bubbles(this: &UdpMessageEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UdpMessageEventInit, val: bool); + pub fn set_cancelable(this: &UdpMessageEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UdpMessageEventInit, val: bool); + pub fn set_composed(this: &UdpMessageEventInit, val: bool); + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &UdpMessageEventInit) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "remoteAddress")] + pub fn get_remote_address(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "remoteAddress")] - fn remote_address_shim(this: &UdpMessageEventInit, val: &str); + pub fn set_remote_address(this: &UdpMessageEventInit, val: &str); + #[doc = "Get the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[wasm_bindgen(method, getter = "remotePort")] + pub fn get_remote_port(this: &UdpMessageEventInit) -> Option; + #[doc = "Change the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] #[wasm_bindgen(method, setter = "remotePort")] - fn remote_port_shim(this: &UdpMessageEventInit, val: u16); + pub fn set_remote_port(this: &UdpMessageEventInit, val: u16); } impl UdpMessageEventInit { #[doc = "Construct a new `UdpMessageEventInit`."] @@ -32,46 +80,34 @@ impl UdpMessageEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data(val); self } - #[doc = "Change the `remoteAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_remote_address()` instead."] pub fn remote_address(&mut self, val: &str) -> &mut Self { - self.remote_address_shim(val); + self.set_remote_address(val); self } - #[doc = "Change the `remotePort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + #[deprecated = "Use `set_remote_port()` instead."] pub fn remote_port(&mut self, val: u16) -> &mut Self { - self.remote_port_shim(val); + self.set_remote_port(val); self } } diff --git a/crates/web-sys/src/features/gen_UdpOptions.rs b/crates/web-sys/src/features/gen_UdpOptions.rs index f890c614629..99b8f998ea1 100644 --- a/crates/web-sys/src/features/gen_UdpOptions.rs +++ b/crates/web-sys/src/features/gen_UdpOptions.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub type UdpOptions; + #[doc = "Get the `addressReuse` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "addressReuse")] + pub fn get_address_reuse(this: &UdpOptions) -> Option; + #[doc = "Change the `addressReuse` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "addressReuse")] - fn address_reuse_shim(this: &UdpOptions, val: bool); + pub fn set_address_reuse(this: &UdpOptions, val: bool); + #[doc = "Get the `localAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "localAddress")] + pub fn get_local_address(this: &UdpOptions) -> Option; + #[doc = "Change the `localAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "localAddress")] - fn local_address_shim(this: &UdpOptions, val: &str); + pub fn set_local_address(this: &UdpOptions, val: &str); + #[doc = "Get the `localPort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "localPort")] + pub fn get_local_port(this: &UdpOptions) -> Option; + #[doc = "Change the `localPort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "localPort")] - fn local_port_shim(this: &UdpOptions, val: u16); + pub fn set_local_port(this: &UdpOptions, val: u16); + #[doc = "Get the `loopback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "loopback")] + pub fn get_loopback(this: &UdpOptions) -> Option; + #[doc = "Change the `loopback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "loopback")] - fn loopback_shim(this: &UdpOptions, val: bool); + pub fn set_loopback(this: &UdpOptions, val: bool); + #[doc = "Get the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "remoteAddress")] + pub fn get_remote_address(this: &UdpOptions) -> Option; + #[doc = "Change the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "remoteAddress")] - fn remote_address_shim(this: &UdpOptions, val: &str); + pub fn set_remote_address(this: &UdpOptions, val: &str); + #[doc = "Get the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[wasm_bindgen(method, getter = "remotePort")] + pub fn get_remote_port(this: &UdpOptions) -> Option; + #[doc = "Change the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] #[wasm_bindgen(method, setter = "remotePort")] - fn remote_port_shim(this: &UdpOptions, val: u16); + pub fn set_remote_port(this: &UdpOptions, val: u16); } impl UdpOptions { #[doc = "Construct a new `UdpOptions`."] @@ -32,46 +80,34 @@ impl UdpOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `addressReuse` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_address_reuse()` instead."] pub fn address_reuse(&mut self, val: bool) -> &mut Self { - self.address_reuse_shim(val); + self.set_address_reuse(val); self } - #[doc = "Change the `localAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_local_address()` instead."] pub fn local_address(&mut self, val: &str) -> &mut Self { - self.local_address_shim(val); + self.set_local_address(val); self } - #[doc = "Change the `localPort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_local_port()` instead."] pub fn local_port(&mut self, val: u16) -> &mut Self { - self.local_port_shim(val); + self.set_local_port(val); self } - #[doc = "Change the `loopback` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_loopback()` instead."] pub fn loopback(&mut self, val: bool) -> &mut Self { - self.loopback_shim(val); + self.set_loopback(val); self } - #[doc = "Change the `remoteAddress` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_remote_address()` instead."] pub fn remote_address(&mut self, val: &str) -> &mut Self { - self.remote_address_shim(val); + self.set_remote_address(val); self } - #[doc = "Change the `remotePort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + #[deprecated = "Use `set_remote_port()` instead."] pub fn remote_port(&mut self, val: u16) -> &mut Self { - self.remote_port_shim(val); + self.set_remote_port(val); self } } diff --git a/crates/web-sys/src/features/gen_UiEventInit.rs b/crates/web-sys/src/features/gen_UiEventInit.rs index de144f4ed4d..75bdfc8b260 100644 --- a/crates/web-sys/src/features/gen_UiEventInit.rs +++ b/crates/web-sys/src/features/gen_UiEventInit.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub type UiEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &UiEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UiEventInit, val: bool); + pub fn set_bubbles(this: &UiEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &UiEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UiEventInit, val: bool); + pub fn set_cancelable(this: &UiEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &UiEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UiEventInit, val: bool); + pub fn set_composed(this: &UiEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &UiEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &UiEventInit, val: i32); + pub fn set_detail(this: &UiEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &UiEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &UiEventInit, val: Option<&Window>); + pub fn set_view(this: &UiEventInit, val: Option<&Window>); } impl UiEventInit { #[doc = "Construct a new `UiEventInit`."] @@ -31,40 +72,30 @@ impl UiEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } } diff --git a/crates/web-sys/src/features/gen_UnderlyingSink.rs b/crates/web-sys/src/features/gen_UnderlyingSink.rs index 458fc583361..c01268facf9 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSink.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSink.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub type UnderlyingSink; + #[doc = "Get the `abort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[wasm_bindgen(method, getter = "abort")] + pub fn get_abort(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `abort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "abort")] - fn abort_shim(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_abort(this: &UnderlyingSink, val: &::js_sys::Function); + #[doc = "Get the `close` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[wasm_bindgen(method, getter = "close")] + pub fn get_close(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `close` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "close")] - fn close_shim(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_close(this: &UnderlyingSink, val: &::js_sys::Function); + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[wasm_bindgen(method, getter = "start")] + pub fn get_start(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_start(this: &UnderlyingSink, val: &::js_sys::Function); + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &UnderlyingSink) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); + pub fn set_type(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `write` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[wasm_bindgen(method, getter = "write")] + pub fn get_write(this: &UnderlyingSink) -> Option<::js_sys::Function>; + #[doc = "Change the `write` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] #[wasm_bindgen(method, setter = "write")] - fn write_shim(this: &UnderlyingSink, val: &::js_sys::Function); + pub fn set_write(this: &UnderlyingSink, val: &::js_sys::Function); } impl UnderlyingSink { #[doc = "Construct a new `UnderlyingSink`."] @@ -30,39 +70,29 @@ impl UnderlyingSink { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `abort` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_abort()` instead."] pub fn abort(&mut self, val: &::js_sys::Function) -> &mut Self { - self.abort_shim(val); + self.set_abort(val); self } - #[doc = "Change the `close` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_close()` instead."] pub fn close(&mut self, val: &::js_sys::Function) -> &mut Self { - self.close_shim(val); + self.set_close(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start(val); self } - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } - #[doc = "Change the `write` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + #[deprecated = "Use `set_write()` instead."] pub fn write(&mut self, val: &::js_sys::Function) -> &mut Self { - self.write_shim(val); + self.set_write(val); self } } diff --git a/crates/web-sys/src/features/gen_UnderlyingSource.rs b/crates/web-sys/src/features/gen_UnderlyingSource.rs index 99efecb0e14..c1da8cc9c1d 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSource.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSource.rs @@ -10,17 +10,58 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub type UnderlyingSource; + #[doc = "Get the `autoAllocateChunkSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[wasm_bindgen(method, getter = "autoAllocateChunkSize")] + pub fn get_auto_allocate_chunk_size(this: &UnderlyingSource) -> Option; + #[doc = "Change the `autoAllocateChunkSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "autoAllocateChunkSize")] - fn auto_allocate_chunk_size_shim(this: &UnderlyingSource, val: f64); + pub fn set_auto_allocate_chunk_size(this: &UnderlyingSource, val: f64); + #[doc = "Get the `cancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[wasm_bindgen(method, getter = "cancel")] + pub fn get_cancel(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `cancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "cancel")] - fn cancel_shim(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_cancel(this: &UnderlyingSource, val: &::js_sys::Function); + #[doc = "Get the `pull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[wasm_bindgen(method, getter = "pull")] + pub fn get_pull(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `pull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "pull")] - fn pull_shim(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_pull(this: &UnderlyingSource, val: &::js_sys::Function); + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[wasm_bindgen(method, getter = "start")] + pub fn get_start(this: &UnderlyingSource) -> Option<::js_sys::Function>; + #[doc = "Change the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &UnderlyingSource, val: &::js_sys::Function); + pub fn set_start(this: &UnderlyingSource, val: &::js_sys::Function); #[cfg(feature = "ReadableStreamType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &UnderlyingSource) -> Option; + #[cfg(feature = "ReadableStreamType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &UnderlyingSource, val: ReadableStreamType); + pub fn set_type(this: &UnderlyingSource, val: ReadableStreamType); } impl UnderlyingSource { #[doc = "Construct a new `UnderlyingSource`."] @@ -31,40 +72,30 @@ impl UnderlyingSource { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `autoAllocateChunkSize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_auto_allocate_chunk_size()` instead."] pub fn auto_allocate_chunk_size(&mut self, val: f64) -> &mut Self { - self.auto_allocate_chunk_size_shim(val); + self.set_auto_allocate_chunk_size(val); self } - #[doc = "Change the `cancel` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_cancel()` instead."] pub fn cancel(&mut self, val: &::js_sys::Function) -> &mut Self { - self.cancel_shim(val); + self.set_cancel(val); self } - #[doc = "Change the `pull` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_pull()` instead."] pub fn pull(&mut self, val: &::js_sys::Function) -> &mut Self { - self.pull_shim(val); + self.set_pull(val); self } - #[doc = "Change the `start` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + #[deprecated = "Use `set_start()` instead."] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start(val); self } #[cfg(feature = "ReadableStreamType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: ReadableStreamType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs index 5bcbff99c6d..0e7b327a5a1 100644 --- a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbConnectionEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UsbConnectionEventInit, val: bool); + pub fn set_bubbles(this: &UsbConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UsbConnectionEventInit, val: bool); + pub fn set_cancelable(this: &UsbConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &UsbConnectionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UsbConnectionEventInit, val: bool); + pub fn set_composed(this: &UsbConnectionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "device")] + pub fn get_device(this: &UsbConnectionEventInit) -> UsbDevice; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbDevice")] + #[doc = "Change the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &UsbConnectionEventInit, val: &UsbDevice); + pub fn set_device(this: &UsbConnectionEventInit, val: &UsbDevice); } #[cfg(web_sys_unstable_apis)] impl UsbConnectionEventInit { @@ -40,48 +105,28 @@ impl UsbConnectionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbDevice")] - #[doc = "Change the `device` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &UsbDevice) -> &mut Self { - self.device_shim(val); + self.set_device(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs index 99a413d2354..0c8c87d3cb8 100644 --- a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs +++ b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs @@ -14,18 +14,100 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbControlTransferParameters; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `index` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "index")] + pub fn get_index(this: &UsbControlTransferParameters) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `index` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "index")] - fn index_shim(this: &UsbControlTransferParameters, val: u16); + pub fn set_index(this: &UsbControlTransferParameters, val: u16); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRecipient")] + #[doc = "Get the `recipient` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "recipient")] + pub fn get_recipient(this: &UsbControlTransferParameters) -> UsbRecipient; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRecipient")] + #[doc = "Change the `recipient` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "recipient")] - fn recipient_shim(this: &UsbControlTransferParameters, val: UsbRecipient); + pub fn set_recipient(this: &UsbControlTransferParameters, val: UsbRecipient); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "request")] + pub fn get_request(this: &UsbControlTransferParameters) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &UsbControlTransferParameters, val: u8); + pub fn set_request(this: &UsbControlTransferParameters, val: u8); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRequestType")] + #[doc = "Get the `requestType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requestType")] + pub fn get_request_type(this: &UsbControlTransferParameters) -> UsbRequestType; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRequestType")] + #[doc = "Change the `requestType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requestType")] - fn request_type_shim(this: &UsbControlTransferParameters, val: UsbRequestType); + pub fn set_request_type(this: &UsbControlTransferParameters, val: UsbRequestType); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &UsbControlTransferParameters) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &UsbControlTransferParameters, val: u16); + pub fn set_value(this: &UsbControlTransferParameters, val: u16); } #[cfg(web_sys_unstable_apis)] impl UsbControlTransferParameters { @@ -53,60 +135,35 @@ impl UsbControlTransferParameters { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `index` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_index()` instead."] pub fn index(&mut self, val: u16) -> &mut Self { - self.index_shim(val); + self.set_index(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRecipient")] - #[doc = "Change the `recipient` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_recipient()` instead."] pub fn recipient(&mut self, val: UsbRecipient) -> &mut Self { - self.recipient_shim(val); + self.set_recipient(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `request` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_request()` instead."] pub fn request(&mut self, val: u8) -> &mut Self { - self.request_shim(val); + self.set_request(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "UsbRequestType")] - #[doc = "Change the `requestType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_request_type()` instead."] pub fn request_type(&mut self, val: UsbRequestType) -> &mut Self { - self.request_type_shim(val); + self.set_request_type(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: u16) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs index 1dcc503db30..411a66a560b 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs @@ -14,32 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbDeviceFilter; - #[wasm_bindgen(method, setter = "classCode")] - fn class_code_shim(this: &UsbDeviceFilter, val: u8); - #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &UsbDeviceFilter, val: u16); - #[wasm_bindgen(method, setter = "protocolCode")] - fn protocol_code_shim(this: &UsbDeviceFilter, val: u8); - #[wasm_bindgen(method, setter = "serialNumber")] - fn serial_number_shim(this: &UsbDeviceFilter, val: &str); - #[wasm_bindgen(method, setter = "subclassCode")] - fn subclass_code_shim(this: &UsbDeviceFilter, val: u8); - #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &UsbDeviceFilter, val: u16); -} -#[cfg(web_sys_unstable_apis)] -impl UsbDeviceFilter { - #[doc = "Construct a new `UsbDeviceFilter`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `classCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "classCode")] + pub fn get_class_code(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `classCode` field of this object."] #[doc = ""] @@ -47,10 +30,17 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn class_code(&mut self, val: u8) -> &mut Self { - self.class_code_shim(val); - self - } + #[wasm_bindgen(method, setter = "classCode")] + pub fn set_class_code(this: &UsbDeviceFilter, val: u8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "productId")] + pub fn get_product_id(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `productId` field of this object."] #[doc = ""] @@ -58,10 +48,17 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn product_id(&mut self, val: u16) -> &mut Self { - self.product_id_shim(val); - self - } + #[wasm_bindgen(method, setter = "productId")] + pub fn set_product_id(this: &UsbDeviceFilter, val: u16); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `protocolCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "protocolCode")] + pub fn get_protocol_code(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `protocolCode` field of this object."] #[doc = ""] @@ -69,10 +66,17 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn protocol_code(&mut self, val: u8) -> &mut Self { - self.protocol_code_shim(val); - self - } + #[wasm_bindgen(method, setter = "protocolCode")] + pub fn set_protocol_code(this: &UsbDeviceFilter, val: u8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "serialNumber")] + pub fn get_serial_number(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `serialNumber` field of this object."] #[doc = ""] @@ -80,10 +84,17 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn serial_number(&mut self, val: &str) -> &mut Self { - self.serial_number_shim(val); - self - } + #[wasm_bindgen(method, setter = "serialNumber")] + pub fn set_serial_number(this: &UsbDeviceFilter, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `subclassCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "subclassCode")] + pub fn get_subclass_code(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `subclassCode` field of this object."] #[doc = ""] @@ -91,10 +102,17 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn subclass_code(&mut self, val: u8) -> &mut Self { - self.subclass_code_shim(val); - self - } + #[wasm_bindgen(method, setter = "subclassCode")] + pub fn set_subclass_code(this: &UsbDeviceFilter, val: u8); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "vendorId")] + pub fn get_vendor_id(this: &UsbDeviceFilter) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `vendorId` field of this object."] #[doc = ""] @@ -102,8 +120,56 @@ impl UsbDeviceFilter { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "vendorId")] + pub fn set_vendor_id(this: &UsbDeviceFilter, val: u16); +} +#[cfg(web_sys_unstable_apis)] +impl UsbDeviceFilter { + #[doc = "Construct a new `UsbDeviceFilter`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_class_code()` instead."] + pub fn class_code(&mut self, val: u8) -> &mut Self { + self.set_class_code(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_product_id()` instead."] + pub fn product_id(&mut self, val: u16) -> &mut Self { + self.set_product_id(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_protocol_code()` instead."] + pub fn protocol_code(&mut self, val: u8) -> &mut Self { + self.set_protocol_code(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_serial_number()` instead."] + pub fn serial_number(&mut self, val: &str) -> &mut Self { + self.set_serial_number(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_subclass_code()` instead."] + pub fn subclass_code(&mut self, val: u8) -> &mut Self { + self.set_subclass_code(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_vendor_id()` instead."] pub fn vendor_id(&mut self, val: u16) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs index 7d05fe0b907..b35430fc377 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbDeviceRequestOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &UsbDeviceRequestOptions) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbDeviceRequestOptions { @@ -32,14 +48,9 @@ impl UsbDeviceRequestOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs index 5688bc47d1f..7240f61781f 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &UsbPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &UsbPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &UsbPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "filters")] + pub fn get_filters(this: &UsbPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_filters(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbPermissionDescriptor { @@ -37,25 +70,15 @@ impl UsbPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `filters` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_filters()` instead."] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs index 7fee5379ed9..7c99dd15666 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbPermissionStorage; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "allowedDevices")] + pub fn get_allowed_devices(this: &UsbPermissionStorage) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "allowedDevices")] - fn allowed_devices_shim(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); + pub fn set_allowed_devices(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl UsbPermissionStorage { @@ -31,14 +47,9 @@ impl UsbPermissionStorage { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `allowedDevices` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_allowed_devices()` instead."] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_devices_shim(val); + self.set_allowed_devices(val); self } } diff --git a/crates/web-sys/src/features/gen_UserProximityEventInit.rs b/crates/web-sys/src/features/gen_UserProximityEventInit.rs index 7ab52a377c8..717e8354c82 100644 --- a/crates/web-sys/src/features/gen_UserProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_UserProximityEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub type UserProximityEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UserProximityEventInit, val: bool); + pub fn set_bubbles(this: &UserProximityEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UserProximityEventInit, val: bool); + pub fn set_cancelable(this: &UserProximityEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UserProximityEventInit, val: bool); + pub fn set_composed(this: &UserProximityEventInit, val: bool); + #[doc = "Get the `near` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[wasm_bindgen(method, getter = "near")] + pub fn get_near(this: &UserProximityEventInit) -> Option; + #[doc = "Change the `near` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] #[wasm_bindgen(method, setter = "near")] - fn near_shim(this: &UserProximityEventInit, val: bool); + pub fn set_near(this: &UserProximityEventInit, val: bool); } impl UserProximityEventInit { #[doc = "Construct a new `UserProximityEventInit`."] @@ -28,32 +60,24 @@ impl UserProximityEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `near` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + #[deprecated = "Use `set_near()` instead."] pub fn near(&mut self, val: bool) -> &mut Self { - self.near_shim(val); + self.set_near(val); self } } diff --git a/crates/web-sys/src/features/gen_ValueEventInit.rs b/crates/web-sys/src/features/gen_ValueEventInit.rs index 0e095a187a1..493a9f39cb0 100644 --- a/crates/web-sys/src/features/gen_ValueEventInit.rs +++ b/crates/web-sys/src/features/gen_ValueEventInit.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ValueEventInit; - #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ValueEventInit, val: bool); - #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ValueEventInit, val: bool); - #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ValueEventInit, val: bool); - #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl ValueEventInit { - #[doc = "Construct a new `ValueEventInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &ValueEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl ValueEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); - self - } + #[wasm_bindgen(method, setter = "bubbles")] + pub fn set_bubbles(this: &ValueEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &ValueEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl ValueEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); - self - } + #[wasm_bindgen(method, setter = "cancelable")] + pub fn set_cancelable(this: &ValueEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &ValueEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl ValueEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); - self - } + #[wasm_bindgen(method, setter = "composed")] + pub fn set_composed(this: &ValueEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &ValueEventInit) -> ::wasm_bindgen::JsValue; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `value` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl ValueEventInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "value")] + pub fn set_value(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl ValueEventInit { + #[doc = "Construct a new `ValueEventInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bubbles()` instead."] + pub fn bubbles(&mut self, val: bool) -> &mut Self { + self.set_bubbles(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_cancelable()` instead."] + pub fn cancelable(&mut self, val: bool) -> &mut Self { + self.set_cancelable(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_composed()` instead."] + pub fn composed(&mut self, val: bool) -> &mut Self { + self.set_composed(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs index e2615680a89..fbf7cd1bc19 100644 --- a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs +++ b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs @@ -14,17 +14,84 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoColorSpaceInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `fullRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "fullRange")] + pub fn get_full_range(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `fullRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "fullRange")] - fn full_range_shim(this: &VideoColorSpaceInit, val: bool); + pub fn set_full_range(this: &VideoColorSpaceInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoMatrixCoefficients")] + #[doc = "Get the `matrix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "matrix")] + pub fn get_matrix(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoMatrixCoefficients")] + #[doc = "Change the `matrix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "matrix")] - fn matrix_shim(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); + pub fn set_matrix(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorPrimaries")] + #[doc = "Get the `primaries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "primaries")] + pub fn get_primaries(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorPrimaries")] + #[doc = "Change the `primaries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "primaries")] - fn primaries_shim(this: &VideoColorSpaceInit, val: VideoColorPrimaries); + pub fn set_primaries(this: &VideoColorSpaceInit, val: VideoColorPrimaries); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoTransferCharacteristics")] + #[doc = "Get the `transfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "transfer")] + pub fn get_transfer(this: &VideoColorSpaceInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoTransferCharacteristics")] + #[doc = "Change the `transfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "transfer")] - fn transfer_shim(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); + pub fn set_transfer(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); } #[cfg(web_sys_unstable_apis)] impl VideoColorSpaceInit { @@ -40,50 +107,30 @@ impl VideoColorSpaceInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `fullRange` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_full_range()` instead."] pub fn full_range(&mut self, val: bool) -> &mut Self { - self.full_range_shim(val); + self.set_full_range(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoMatrixCoefficients")] - #[doc = "Change the `matrix` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_matrix()` instead."] pub fn matrix(&mut self, val: VideoMatrixCoefficients) -> &mut Self { - self.matrix_shim(val); + self.set_matrix(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorPrimaries")] - #[doc = "Change the `primaries` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_primaries()` instead."] pub fn primaries(&mut self, val: VideoColorPrimaries) -> &mut Self { - self.primaries_shim(val); + self.set_primaries(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoTransferCharacteristics")] - #[doc = "Change the `transfer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_transfer()` instead."] pub fn transfer(&mut self, val: VideoTransferCharacteristics) -> &mut Self { - self.transfer_shim(val); + self.set_transfer(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoConfiguration.rs b/crates/web-sys/src/features/gen_VideoConfiguration.rs index e3ec5697201..d6467cf6b20 100644 --- a/crates/web-sys/src/features/gen_VideoConfiguration.rs +++ b/crates/web-sys/src/features/gen_VideoConfiguration.rs @@ -10,16 +10,56 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub type VideoConfiguration; + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "bitrate")] + pub fn get_bitrate(this: &VideoConfiguration) -> Option; + #[doc = "Change the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &VideoConfiguration, val: f64); + pub fn set_bitrate(this: &VideoConfiguration, val: f64); + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "contentType")] + pub fn get_content_type(this: &VideoConfiguration) -> Option; + #[doc = "Change the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &VideoConfiguration, val: &str); + pub fn set_content_type(this: &VideoConfiguration, val: &str); + #[doc = "Get the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "framerate")] + pub fn get_framerate(this: &VideoConfiguration) -> Option; + #[doc = "Change the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "framerate")] - fn framerate_shim(this: &VideoConfiguration, val: &str); + pub fn set_framerate(this: &VideoConfiguration, val: &str); + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &VideoConfiguration) -> Option; + #[doc = "Change the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &VideoConfiguration, val: u32); + pub fn set_height(this: &VideoConfiguration, val: u32); + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &VideoConfiguration) -> Option; + #[doc = "Change the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &VideoConfiguration, val: u32); + pub fn set_width(this: &VideoConfiguration, val: u32); } impl VideoConfiguration { #[doc = "Construct a new `VideoConfiguration`."] @@ -30,39 +70,29 @@ impl VideoConfiguration { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bitrate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_bitrate()` instead."] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate(val); self } - #[doc = "Change the `contentType` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_content_type()` instead."] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type(val); self } - #[doc = "Change the `framerate` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_framerate()` instead."] pub fn framerate(&mut self, val: &str) -> &mut Self { - self.framerate_shim(val); + self.set_framerate(val); self } - #[doc = "Change the `height` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_height()` instead."] pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); + self.set_height(val); self } - #[doc = "Change the `width` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs index 6dba5389dd5..44c205a0984 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs @@ -14,41 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderConfig; - #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &VideoDecoderConfig, val: &str); - #[wasm_bindgen(method, setter = "codedHeight")] - fn coded_height_shim(this: &VideoDecoderConfig, val: u32); - #[wasm_bindgen(method, setter = "codedWidth")] - fn coded_width_shim(this: &VideoDecoderConfig, val: u32); - #[cfg(feature = "VideoColorSpaceInit")] - #[wasm_bindgen(method, setter = "colorSpace")] - fn color_space_shim(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); - #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &VideoDecoderConfig, val: &::js_sys::Object); - #[wasm_bindgen(method, setter = "displayAspectHeight")] - fn display_aspect_height_shim(this: &VideoDecoderConfig, val: u32); - #[wasm_bindgen(method, setter = "displayAspectWidth")] - fn display_aspect_width_shim(this: &VideoDecoderConfig, val: u32); - #[cfg(feature = "HardwareAcceleration")] - #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn hardware_acceleration_shim(this: &VideoDecoderConfig, val: HardwareAcceleration); - #[wasm_bindgen(method, setter = "optimizeForLatency")] - fn optimize_for_latency_shim(this: &VideoDecoderConfig, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl VideoDecoderConfig { - #[doc = "Construct a new `VideoDecoderConfig`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(codec: &str) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); - ret - } + #[wasm_bindgen(method, getter = "codec")] + pub fn get_codec(this: &VideoDecoderConfig) -> String; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codec` field of this object."] #[doc = ""] @@ -56,10 +30,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); - self - } + #[wasm_bindgen(method, setter = "codec")] + pub fn set_codec(this: &VideoDecoderConfig, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codedHeight")] + pub fn get_coded_height(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codedHeight` field of this object."] #[doc = ""] @@ -67,10 +48,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn coded_height(&mut self, val: u32) -> &mut Self { - self.coded_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "codedHeight")] + pub fn set_coded_height(this: &VideoDecoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codedWidth")] + pub fn get_coded_width(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codedWidth` field of this object."] #[doc = ""] @@ -78,10 +66,18 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn coded_width(&mut self, val: u32) -> &mut Self { - self.coded_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "codedWidth")] + pub fn set_coded_width(this: &VideoDecoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Get the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "colorSpace")] + pub fn get_color_space(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] #[doc = "Change the `colorSpace` field of this object."] @@ -90,10 +86,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { - self.color_space_shim(val); - self - } + #[wasm_bindgen(method, setter = "colorSpace")] + pub fn set_color_space(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &VideoDecoderConfig) -> Option<::js_sys::Object>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `description` field of this object."] #[doc = ""] @@ -101,10 +104,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { - self.description_shim(val); - self - } + #[wasm_bindgen(method, setter = "description")] + pub fn set_description(this: &VideoDecoderConfig, val: &::js_sys::Object); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayAspectHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayAspectHeight")] + pub fn get_display_aspect_height(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayAspectHeight` field of this object."] #[doc = ""] @@ -112,10 +122,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_aspect_height(&mut self, val: u32) -> &mut Self { - self.display_aspect_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayAspectHeight")] + pub fn set_display_aspect_height(this: &VideoDecoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayAspectWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayAspectWidth")] + pub fn get_display_aspect_width(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayAspectWidth` field of this object."] #[doc = ""] @@ -123,10 +140,18 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_aspect_width(&mut self, val: u32) -> &mut Self { - self.display_aspect_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayAspectWidth")] + pub fn set_display_aspect_width(this: &VideoDecoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[doc = "Get the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "hardwareAcceleration")] + pub fn get_hardware_acceleration(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] #[doc = "Change the `hardwareAcceleration` field of this object."] @@ -135,10 +160,17 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { - self.hardware_acceleration_shim(val); - self - } + #[wasm_bindgen(method, setter = "hardwareAcceleration")] + pub fn set_hardware_acceleration(this: &VideoDecoderConfig, val: HardwareAcceleration); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optimizeForLatency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "optimizeForLatency")] + pub fn get_optimize_for_latency(this: &VideoDecoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `optimizeForLatency` field of this object."] #[doc = ""] @@ -146,8 +178,77 @@ impl VideoDecoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "optimizeForLatency")] + pub fn set_optimize_for_latency(this: &VideoDecoderConfig, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl VideoDecoderConfig { + #[doc = "Construct a new `VideoDecoderConfig`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(codec: &str) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.codec(codec); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_codec()` instead."] + pub fn codec(&mut self, val: &str) -> &mut Self { + self.set_codec(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_coded_height()` instead."] + pub fn coded_height(&mut self, val: u32) -> &mut Self { + self.set_coded_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_coded_width()` instead."] + pub fn coded_width(&mut self, val: u32) -> &mut Self { + self.set_coded_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[deprecated = "Use `set_color_space()` instead."] + pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { + self.set_color_space(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_description()` instead."] + pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { + self.set_description(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_aspect_height()` instead."] + pub fn display_aspect_height(&mut self, val: u32) -> &mut Self { + self.set_display_aspect_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_aspect_width()` instead."] + pub fn display_aspect_width(&mut self, val: u32) -> &mut Self { + self.set_display_aspect_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[deprecated = "Use `set_hardware_acceleration()` instead."] + pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { + self.set_hardware_acceleration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_optimize_for_latency()` instead."] pub fn optimize_for_latency(&mut self, val: bool) -> &mut Self { - self.optimize_for_latency_shim(val); + self.set_optimize_for_latency(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderInit.rs b/crates/web-sys/src/features/gen_VideoDecoderInit.rs index a4b15fb60ba..19413cd55ab 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &VideoDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &VideoDecoderInit, val: &::js_sys::Function); + pub fn set_error(this: &VideoDecoderInit, val: &::js_sys::Function); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "output")] + pub fn get_output(this: &VideoDecoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &VideoDecoderInit, val: &::js_sys::Function); + pub fn set_output(this: &VideoDecoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl VideoDecoderInit { @@ -35,25 +67,15 @@ impl VideoDecoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs index 25c91ef0900..74356620b90 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderSupport; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "config")] + pub fn get_config(this: &VideoDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &VideoDecoderSupport, val: &VideoDecoderConfig); + pub fn set_config(this: &VideoDecoderSupport, val: &VideoDecoderConfig); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "supported")] + pub fn get_supported(this: &VideoDecoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &VideoDecoderSupport, val: bool); + pub fn set_supported(this: &VideoDecoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoDecoderSupport { @@ -35,25 +68,15 @@ impl VideoDecoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoDecoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &VideoDecoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs index e546329b66e..b497f718d8b 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs @@ -14,48 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderConfig; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] - #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &VideoEncoderConfig, val: AlphaOption); - #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &VideoEncoderConfig, val: f64); - #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &VideoEncoderConfig, val: &str); - #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoEncoderConfig, val: u32); - #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoEncoderConfig, val: u32); - #[wasm_bindgen(method, setter = "framerate")] - fn framerate_shim(this: &VideoEncoderConfig, val: f64); - #[cfg(feature = "HardwareAcceleration")] - #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn hardware_acceleration_shim(this: &VideoEncoderConfig, val: HardwareAcceleration); - #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &VideoEncoderConfig, val: u32); - #[cfg(feature = "LatencyMode")] - #[wasm_bindgen(method, setter = "latencyMode")] - fn latency_mode_shim(this: &VideoEncoderConfig, val: LatencyMode); - #[wasm_bindgen(method, setter = "scalabilityMode")] - fn scalability_mode_shim(this: &VideoEncoderConfig, val: &str); - #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &VideoEncoderConfig, val: u32); -} -#[cfg(web_sys_unstable_apis)] -impl VideoEncoderConfig { - #[doc = "Construct a new `VideoEncoderConfig`."] + #[doc = "Get the `alpha` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new(codec: &str, height: u32, width: u32) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); - ret.height(height); - ret.width(width); - ret - } + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] #[doc = "Change the `alpha` field of this object."] @@ -64,10 +32,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { - self.alpha_shim(val); - self - } + #[wasm_bindgen(method, setter = "alpha")] + pub fn set_alpha(this: &VideoEncoderConfig, val: AlphaOption); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bitrate")] + pub fn get_bitrate(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bitrate` field of this object."] #[doc = ""] @@ -75,10 +50,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); - self - } + #[wasm_bindgen(method, setter = "bitrate")] + pub fn set_bitrate(this: &VideoEncoderConfig, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codec")] + pub fn get_codec(this: &VideoEncoderConfig) -> String; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codec` field of this object."] #[doc = ""] @@ -86,10 +68,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); - self - } + #[wasm_bindgen(method, setter = "codec")] + pub fn set_codec(this: &VideoEncoderConfig, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayHeight")] + pub fn get_display_height(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayHeight` field of this object."] #[doc = ""] @@ -97,10 +86,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayHeight")] + pub fn set_display_height(this: &VideoEncoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayWidth")] + pub fn get_display_width(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayWidth` field of this object."] #[doc = ""] @@ -108,10 +104,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayWidth")] + pub fn set_display_width(this: &VideoEncoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "framerate")] + pub fn get_framerate(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `framerate` field of this object."] #[doc = ""] @@ -119,10 +122,18 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn framerate(&mut self, val: f64) -> &mut Self { - self.framerate_shim(val); - self - } + #[wasm_bindgen(method, setter = "framerate")] + pub fn set_framerate(this: &VideoEncoderConfig, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[doc = "Get the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "hardwareAcceleration")] + pub fn get_hardware_acceleration(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "HardwareAcceleration")] #[doc = "Change the `hardwareAcceleration` field of this object."] @@ -131,10 +142,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { - self.hardware_acceleration_shim(val); - self - } + #[wasm_bindgen(method, setter = "hardwareAcceleration")] + pub fn set_hardware_acceleration(this: &VideoEncoderConfig, val: HardwareAcceleration); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "height")] + pub fn get_height(this: &VideoEncoderConfig) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `height` field of this object."] #[doc = ""] @@ -142,10 +160,18 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); - self - } + #[wasm_bindgen(method, setter = "height")] + pub fn set_height(this: &VideoEncoderConfig, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LatencyMode")] + #[doc = "Get the `latencyMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "latencyMode")] + pub fn get_latency_mode(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "LatencyMode")] #[doc = "Change the `latencyMode` field of this object."] @@ -154,10 +180,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn latency_mode(&mut self, val: LatencyMode) -> &mut Self { - self.latency_mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "latencyMode")] + pub fn set_latency_mode(this: &VideoEncoderConfig, val: LatencyMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "scalabilityMode")] + pub fn get_scalability_mode(this: &VideoEncoderConfig) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `scalabilityMode` field of this object."] #[doc = ""] @@ -165,10 +198,17 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn scalability_mode(&mut self, val: &str) -> &mut Self { - self.scalability_mode_shim(val); - self - } + #[wasm_bindgen(method, setter = "scalabilityMode")] + pub fn set_scalability_mode(this: &VideoEncoderConfig, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "width")] + pub fn get_width(this: &VideoEncoderConfig) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `width` field of this object."] #[doc = ""] @@ -176,8 +216,92 @@ impl VideoEncoderConfig { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "width")] + pub fn set_width(this: &VideoEncoderConfig, val: u32); +} +#[cfg(web_sys_unstable_apis)] +impl VideoEncoderConfig { + #[doc = "Construct a new `VideoEncoderConfig`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new(codec: &str, height: u32, width: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.codec(codec); + ret.height(height); + ret.width(width); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + #[deprecated = "Use `set_alpha()` instead."] + pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { + self.set_alpha(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bitrate()` instead."] + pub fn bitrate(&mut self, val: f64) -> &mut Self { + self.set_bitrate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_codec()` instead."] + pub fn codec(&mut self, val: &str) -> &mut Self { + self.set_codec(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_height()` instead."] + pub fn display_height(&mut self, val: u32) -> &mut Self { + self.set_display_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_width()` instead."] + pub fn display_width(&mut self, val: u32) -> &mut Self { + self.set_display_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_framerate()` instead."] + pub fn framerate(&mut self, val: f64) -> &mut Self { + self.set_framerate(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[deprecated = "Use `set_hardware_acceleration()` instead."] + pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { + self.set_hardware_acceleration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_height()` instead."] + pub fn height(&mut self, val: u32) -> &mut Self { + self.set_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LatencyMode")] + #[deprecated = "Use `set_latency_mode()` instead."] + pub fn latency_mode(&mut self, val: LatencyMode) -> &mut Self { + self.set_latency_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_scalability_mode()` instead."] + pub fn scalability_mode(&mut self, val: &str) -> &mut Self { + self.set_scalability_mode(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_width()` instead."] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs index f95a89936ee..18c58aac847 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderEncodeOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `keyFrame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "keyFrame")] + pub fn get_key_frame(this: &VideoEncoderEncodeOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `keyFrame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "keyFrame")] - fn key_frame_shim(this: &VideoEncoderEncodeOptions, val: bool); + pub fn set_key_frame(this: &VideoEncoderEncodeOptions, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderEncodeOptions { @@ -31,14 +47,9 @@ impl VideoEncoderEncodeOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `keyFrame` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_key_frame()` instead."] pub fn key_frame(&mut self, val: bool) -> &mut Self { - self.key_frame_shim(val); + self.set_key_frame(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderInit.rs b/crates/web-sys/src/features/gen_VideoEncoderInit.rs index cbded7262e9..47bd0e591d8 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "error")] + pub fn get_error(this: &VideoEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &VideoEncoderInit, val: &::js_sys::Function); + pub fn set_error(this: &VideoEncoderInit, val: &::js_sys::Function); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "output")] + pub fn get_output(this: &VideoEncoderInit) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &VideoEncoderInit, val: &::js_sys::Function); + pub fn set_output(this: &VideoEncoderInit, val: &::js_sys::Function); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderInit { @@ -35,25 +67,15 @@ impl VideoEncoderInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `error` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_error()` instead."] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `output` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_output()` instead."] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs index eb438851292..8fa25810ba6 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderSupport; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoEncoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "config")] + pub fn get_config(this: &VideoEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoEncoderConfig")] + #[doc = "Change the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &VideoEncoderSupport, val: &VideoEncoderConfig); + pub fn set_config(this: &VideoEncoderSupport, val: &VideoEncoderConfig); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "supported")] + pub fn get_supported(this: &VideoEncoderSupport) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &VideoEncoderSupport, val: bool); + pub fn set_supported(this: &VideoEncoderSupport, val: bool); } #[cfg(web_sys_unstable_apis)] impl VideoEncoderSupport { @@ -35,25 +68,15 @@ impl VideoEncoderSupport { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoEncoderConfig")] - #[doc = "Change the `config` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_config()` instead."] pub fn config(&mut self, val: &VideoEncoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `supported` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_supported()` instead."] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs index f86531d6092..6b595155c23 100644 --- a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs @@ -14,53 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameBufferInit; - #[wasm_bindgen(method, setter = "codedHeight")] - fn coded_height_shim(this: &VideoFrameBufferInit, val: u32); - #[wasm_bindgen(method, setter = "codedWidth")] - fn coded_width_shim(this: &VideoFrameBufferInit, val: u32); - #[cfg(feature = "VideoColorSpaceInit")] - #[wasm_bindgen(method, setter = "colorSpace")] - fn color_space_shim(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); - #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoFrameBufferInit, val: u32); - #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoFrameBufferInit, val: u32); - #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &VideoFrameBufferInit, val: f64); - #[cfg(feature = "VideoPixelFormat")] - #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &VideoFrameBufferInit, val: VideoPixelFormat); - #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &VideoFrameBufferInit, val: f64); - #[cfg(feature = "DomRectInit")] - #[wasm_bindgen(method, setter = "visibleRect")] - fn visible_rect_shim(this: &VideoFrameBufferInit, val: &DomRectInit); -} -#[cfg(web_sys_unstable_apis)] -impl VideoFrameBufferInit { - #[cfg(feature = "VideoPixelFormat")] - #[doc = "Construct a new `VideoFrameBufferInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedHeight` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new( - coded_height: u32, - coded_width: u32, - format: VideoPixelFormat, - timestamp: f64, - ) -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.coded_height(coded_height); - ret.coded_width(coded_width); - ret.format(format); - ret.timestamp(timestamp); - ret - } + #[wasm_bindgen(method, getter = "codedHeight")] + pub fn get_coded_height(this: &VideoFrameBufferInit) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codedHeight` field of this object."] #[doc = ""] @@ -68,10 +30,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn coded_height(&mut self, val: u32) -> &mut Self { - self.coded_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "codedHeight")] + pub fn set_coded_height(this: &VideoFrameBufferInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "codedWidth")] + pub fn get_coded_width(this: &VideoFrameBufferInit) -> u32; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `codedWidth` field of this object."] #[doc = ""] @@ -79,10 +48,18 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn coded_width(&mut self, val: u32) -> &mut Self { - self.coded_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "codedWidth")] + pub fn set_coded_width(this: &VideoFrameBufferInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Get the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "colorSpace")] + pub fn get_color_space(this: &VideoFrameBufferInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoColorSpaceInit")] #[doc = "Change the `colorSpace` field of this object."] @@ -91,10 +68,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { - self.color_space_shim(val); - self - } + #[wasm_bindgen(method, setter = "colorSpace")] + pub fn set_color_space(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayHeight")] + pub fn get_display_height(this: &VideoFrameBufferInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayHeight` field of this object."] #[doc = ""] @@ -102,10 +86,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayHeight")] + pub fn set_display_height(this: &VideoFrameBufferInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayWidth")] + pub fn get_display_width(this: &VideoFrameBufferInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayWidth` field of this object."] #[doc = ""] @@ -113,10 +104,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayWidth")] + pub fn set_display_width(this: &VideoFrameBufferInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &VideoFrameBufferInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `duration` field of this object."] #[doc = ""] @@ -124,10 +122,18 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); - self - } + #[wasm_bindgen(method, setter = "duration")] + pub fn set_duration(this: &VideoFrameBufferInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoPixelFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "format")] + pub fn get_format(this: &VideoFrameBufferInit) -> VideoPixelFormat; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "VideoPixelFormat")] #[doc = "Change the `format` field of this object."] @@ -136,10 +142,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self { - self.format_shim(val); - self - } + #[wasm_bindgen(method, setter = "format")] + pub fn set_format(this: &VideoFrameBufferInit, val: VideoPixelFormat); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &VideoFrameBufferInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `layout` field of this object."] #[doc = ""] @@ -147,10 +160,17 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); - self - } + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &VideoFrameBufferInit) -> f64; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -158,10 +178,18 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); - self - } + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &VideoFrameBufferInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "visibleRect")] + pub fn get_visible_rect(this: &VideoFrameBufferInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] #[doc = "Change the `visibleRect` field of this object."] @@ -170,8 +198,93 @@ impl VideoFrameBufferInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "visibleRect")] + pub fn set_visible_rect(this: &VideoFrameBufferInit, val: &DomRectInit); +} +#[cfg(web_sys_unstable_apis)] +impl VideoFrameBufferInit { + #[cfg(feature = "VideoPixelFormat")] + #[doc = "Construct a new `VideoFrameBufferInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new( + coded_height: u32, + coded_width: u32, + format: VideoPixelFormat, + timestamp: f64, + ) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.coded_height(coded_height); + ret.coded_width(coded_width); + ret.format(format); + ret.timestamp(timestamp); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_coded_height()` instead."] + pub fn coded_height(&mut self, val: u32) -> &mut Self { + self.set_coded_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_coded_width()` instead."] + pub fn coded_width(&mut self, val: u32) -> &mut Self { + self.set_coded_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[deprecated = "Use `set_color_space()` instead."] + pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { + self.set_color_space(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_height()` instead."] + pub fn display_height(&mut self, val: u32) -> &mut Self { + self.set_display_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_width()` instead."] + pub fn display_width(&mut self, val: u32) -> &mut Self { + self.set_display_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_duration()` instead."] + pub fn duration(&mut self, val: f64) -> &mut Self { + self.set_duration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoPixelFormat")] + #[deprecated = "Use `set_format()` instead."] + pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self { + self.set_format(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_layout()` instead."] + pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + self.set_layout(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] + pub fn timestamp(&mut self, val: f64) -> &mut Self { + self.set_timestamp(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[deprecated = "Use `set_visible_rect()` instead."] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.visible_rect_shim(val); + self.set_visible_rect(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs index b4daba7283d..686a12cbd92 100644 --- a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameCopyToOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] + #[doc = "Get the `rect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "rect")] + pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Change the `rect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rect")] - fn rect_shim(this: &VideoFrameCopyToOptions, val: &DomRectInit); + pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit); } #[cfg(web_sys_unstable_apis)] impl VideoFrameCopyToOptions { @@ -34,26 +67,16 @@ impl VideoFrameCopyToOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `layout` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_layout()` instead."] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] - #[doc = "Change the `rect` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_rect()` instead."] pub fn rect(&mut self, val: &DomRectInit) -> &mut Self { - self.rect_shim(val); + self.set_rect(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameInit.rs b/crates/web-sys/src/features/gen_VideoFrameInit.rs index 41ece8b8c55..2180804556f 100644 --- a/crates/web-sys/src/features/gen_VideoFrameInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameInit.rs @@ -14,34 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameInit; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] - #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &VideoFrameInit, val: AlphaOption); - #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoFrameInit, val: u32); - #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoFrameInit, val: u32); - #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &VideoFrameInit, val: f64); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &VideoFrameInit, val: f64); - #[cfg(feature = "DomRectInit")] - #[wasm_bindgen(method, setter = "visibleRect")] - fn visible_rect_shim(this: &VideoFrameInit, val: &DomRectInit); -} -#[cfg(web_sys_unstable_apis)] -impl VideoFrameInit { - #[doc = "Construct a new `VideoFrameInit`."] + #[doc = "Get the `alpha` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AlphaOption")] #[doc = "Change the `alpha` field of this object."] @@ -50,10 +32,17 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { - self.alpha_shim(val); - self - } + #[wasm_bindgen(method, setter = "alpha")] + pub fn set_alpha(this: &VideoFrameInit, val: AlphaOption); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayHeight")] + pub fn get_display_height(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayHeight` field of this object."] #[doc = ""] @@ -61,10 +50,17 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayHeight")] + pub fn set_display_height(this: &VideoFrameInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "displayWidth")] + pub fn get_display_width(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `displayWidth` field of this object."] #[doc = ""] @@ -72,10 +68,17 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); - self - } + #[wasm_bindgen(method, setter = "displayWidth")] + pub fn set_display_width(this: &VideoFrameInit, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "duration")] + pub fn get_duration(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `duration` field of this object."] #[doc = ""] @@ -83,10 +86,17 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); - self - } + #[wasm_bindgen(method, setter = "duration")] + pub fn set_duration(this: &VideoFrameInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -94,10 +104,18 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); - self - } + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &VideoFrameInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "visibleRect")] + pub fn get_visible_rect(this: &VideoFrameInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "DomRectInit")] #[doc = "Change the `visibleRect` field of this object."] @@ -106,8 +124,58 @@ impl VideoFrameInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "visibleRect")] + pub fn set_visible_rect(this: &VideoFrameInit, val: &DomRectInit); +} +#[cfg(web_sys_unstable_apis)] +impl VideoFrameInit { + #[doc = "Construct a new `VideoFrameInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + #[deprecated = "Use `set_alpha()` instead."] + pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { + self.set_alpha(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_height()` instead."] + pub fn display_height(&mut self, val: u32) -> &mut Self { + self.set_display_height(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_display_width()` instead."] + pub fn display_width(&mut self, val: u32) -> &mut Self { + self.set_display_width(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_duration()` instead."] + pub fn duration(&mut self, val: f64) -> &mut Self { + self.set_duration(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] + pub fn timestamp(&mut self, val: f64) -> &mut Self { + self.set_timestamp(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[deprecated = "Use `set_visible_rect()` instead."] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.visible_rect_shim(val); + self.set_visible_rect(val); self } } diff --git a/crates/web-sys/src/features/gen_VoidCallback.rs b/crates/web-sys/src/features/gen_VoidCallback.rs index 08d9643e49c..46b21e4a6e5 100644 --- a/crates/web-sys/src/features/gen_VoidCallback.rs +++ b/crates/web-sys/src/features/gen_VoidCallback.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] pub type VoidCallback; + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] + #[wasm_bindgen(method, getter = "handleEvent")] + pub fn get_handle_event(this: &VoidCallback) -> Option<::js_sys::Function>; + #[doc = "Change the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &VoidCallback, val: &::js_sys::Function); + pub fn set_handle_event(this: &VoidCallback, val: &::js_sys::Function); } impl VoidCallback { #[doc = "Construct a new `VoidCallback`."] @@ -22,11 +30,9 @@ impl VoidCallback { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `handleEvent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] + #[deprecated = "Use `set_handle_event()` instead."] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event(val); self } } diff --git a/crates/web-sys/src/features/gen_VrLayer.rs b/crates/web-sys/src/features/gen_VrLayer.rs index fef6d7169ab..7fd282af462 100644 --- a/crates/web-sys/src/features/gen_VrLayer.rs +++ b/crates/web-sys/src/features/gen_VrLayer.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] pub type VrLayer; + #[doc = "Get the `leftBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[wasm_bindgen(method, getter = "leftBounds")] + pub fn get_left_bounds(this: &VrLayer) -> Option<::js_sys::Array>; + #[doc = "Change the `leftBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, setter = "leftBounds")] - fn left_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + pub fn set_left_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `rightBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[wasm_bindgen(method, getter = "rightBounds")] + pub fn get_right_bounds(this: &VrLayer) -> Option<::js_sys::Array>; + #[doc = "Change the `rightBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] #[wasm_bindgen(method, setter = "rightBounds")] - fn right_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + pub fn set_right_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "HtmlCanvasElement")] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &VrLayer) -> Option; #[cfg(feature = "HtmlCanvasElement")] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &VrLayer, val: Option<&HtmlCanvasElement>); + pub fn set_source(this: &VrLayer, val: Option<&HtmlCanvasElement>); } impl VrLayer { #[doc = "Construct a new `VrLayer`."] @@ -27,26 +52,20 @@ impl VrLayer { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `leftBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[deprecated = "Use `set_left_bounds()` instead."] pub fn left_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.left_bounds_shim(val); + self.set_left_bounds(val); self } - #[doc = "Change the `rightBounds` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + #[deprecated = "Use `set_right_bounds()` instead."] pub fn right_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.right_bounds_shim(val); + self.set_right_bounds(val); self } #[cfg(feature = "HtmlCanvasElement")] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: Option<&HtmlCanvasElement>) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } } diff --git a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs index 910cb67592b..74a95c2f42e 100644 --- a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs +++ b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs @@ -14,9 +14,26 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WatchAdvertisementsOptions; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "signal")] + pub fn get_signal(this: &WatchAdvertisementsOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] + #[doc = "Change the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &WatchAdvertisementsOptions, val: &AbortSignal); + pub fn set_signal(this: &WatchAdvertisementsOptions, val: &AbortSignal); } #[cfg(web_sys_unstable_apis)] impl WatchAdvertisementsOptions { @@ -33,14 +50,9 @@ impl WatchAdvertisementsOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "AbortSignal")] - #[doc = "Change the `signal` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_signal()` instead."] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal(val); self } } diff --git a/crates/web-sys/src/features/gen_WaveShaperOptions.rs b/crates/web-sys/src/features/gen_WaveShaperOptions.rs index 73eae9c0dc8..181269e5fa7 100644 --- a/crates/web-sys/src/features/gen_WaveShaperOptions.rs +++ b/crates/web-sys/src/features/gen_WaveShaperOptions.rs @@ -10,19 +10,62 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] pub type WaveShaperOptions; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[wasm_bindgen(method, getter = "channelCount")] + pub fn get_channel_count(this: &WaveShaperOptions) -> Option; + #[doc = "Change the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &WaveShaperOptions, val: u32); + pub fn set_channel_count(this: &WaveShaperOptions, val: u32); #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] + #[wasm_bindgen(method, getter = "channelCountMode")] + pub fn get_channel_count_mode(this: &WaveShaperOptions) -> Option; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Change the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &WaveShaperOptions, val: ChannelCountMode); + pub fn set_channel_count_mode(this: &WaveShaperOptions, val: ChannelCountMode); #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] + #[wasm_bindgen(method, getter = "channelInterpretation")] + pub fn get_channel_interpretation(this: &WaveShaperOptions) -> Option; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Change the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &WaveShaperOptions, val: ChannelInterpretation); + pub fn set_channel_interpretation(this: &WaveShaperOptions, val: ChannelInterpretation); + #[doc = "Get the `curve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[wasm_bindgen(method, getter = "curve")] + pub fn get_curve(this: &WaveShaperOptions) -> Option<::js_sys::Array>; + #[doc = "Change the `curve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "curve")] - fn curve_shim(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); + pub fn set_curve(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); #[cfg(feature = "OverSampleType")] + #[doc = "Get the `oversample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] + #[wasm_bindgen(method, getter = "oversample")] + pub fn get_oversample(this: &WaveShaperOptions) -> Option; + #[cfg(feature = "OverSampleType")] + #[doc = "Change the `oversample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] #[wasm_bindgen(method, setter = "oversample")] - fn oversample_shim(this: &WaveShaperOptions, val: OverSampleType); + pub fn set_oversample(this: &WaveShaperOptions, val: OverSampleType); } impl WaveShaperOptions { #[doc = "Construct a new `WaveShaperOptions`."] @@ -33,42 +76,32 @@ impl WaveShaperOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `channelCount` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_count()` instead."] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count(val); self } #[cfg(feature = "ChannelCountMode")] - #[doc = "Change the `channelCountMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_count_mode()` instead."] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode(val); self } #[cfg(feature = "ChannelInterpretation")] - #[doc = "Change the `channelInterpretation` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_channel_interpretation()` instead."] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation(val); self } - #[doc = "Change the `curve` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + #[deprecated = "Use `set_curve()` instead."] pub fn curve(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.curve_shim(val); + self.set_curve(val); self } #[cfg(feature = "OverSampleType")] - #[doc = "Change the `oversample` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] + #[deprecated = "Use `set_oversample()` instead."] pub fn oversample(&mut self, val: OverSampleType) -> &mut Self { - self.oversample_shim(val); + self.set_oversample(val); self } } diff --git a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs index d939df42117..23109aab97e 100644 --- a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs +++ b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs @@ -10,25 +10,106 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub type WebGlContextAttributes; + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_alpha(this: &WebGlContextAttributes, val: bool); + #[doc = "Get the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "antialias")] + pub fn get_antialias(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "antialias")] - fn antialias_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_antialias(this: &WebGlContextAttributes, val: bool); + #[doc = "Get the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "depth")] + pub fn get_depth(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "depth")] - fn depth_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_depth(this: &WebGlContextAttributes, val: bool); + #[doc = "Get the `failIfMajorPerformanceCaveat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "failIfMajorPerformanceCaveat")] + pub fn get_fail_if_major_performance_caveat(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `failIfMajorPerformanceCaveat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "failIfMajorPerformanceCaveat")] - fn fail_if_major_performance_caveat_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_fail_if_major_performance_caveat(this: &WebGlContextAttributes, val: bool); + #[cfg(feature = "WebGlPowerPreference")] + #[doc = "Get the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] + #[wasm_bindgen(method, getter = "powerPreference")] + pub fn get_power_preference(this: &WebGlContextAttributes) -> Option; #[cfg(feature = "WebGlPowerPreference")] + #[doc = "Change the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] #[wasm_bindgen(method, setter = "powerPreference")] - fn power_preference_shim(this: &WebGlContextAttributes, val: WebGlPowerPreference); + pub fn set_power_preference(this: &WebGlContextAttributes, val: WebGlPowerPreference); + #[doc = "Get the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "premultipliedAlpha")] + pub fn get_premultiplied_alpha(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn premultiplied_alpha_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_premultiplied_alpha(this: &WebGlContextAttributes, val: bool); + #[doc = "Get the `preserveDrawingBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "preserveDrawingBuffer")] + pub fn get_preserve_drawing_buffer(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `preserveDrawingBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "preserveDrawingBuffer")] - fn preserve_drawing_buffer_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_preserve_drawing_buffer(this: &WebGlContextAttributes, val: bool); + #[doc = "Get the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[wasm_bindgen(method, getter = "stencil")] + pub fn get_stencil(this: &WebGlContextAttributes) -> Option; + #[doc = "Change the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] #[wasm_bindgen(method, setter = "stencil")] - fn stencil_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_stencil(this: &WebGlContextAttributes, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `xrCompatible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "xrCompatible")] + pub fn get_xr_compatible(this: &WebGlContextAttributes) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `xrCompatible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "xrCompatible")] - fn xr_compatible_shim(this: &WebGlContextAttributes, val: bool); + pub fn set_xr_compatible(this: &WebGlContextAttributes, val: bool); } impl WebGlContextAttributes { #[doc = "Construct a new `WebGlContextAttributes`."] @@ -39,72 +120,51 @@ impl WebGlContextAttributes { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `alpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_alpha()` instead."] pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); + self.set_alpha(val); self } - #[doc = "Change the `antialias` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_antialias()` instead."] pub fn antialias(&mut self, val: bool) -> &mut Self { - self.antialias_shim(val); + self.set_antialias(val); self } - #[doc = "Change the `depth` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_depth()` instead."] pub fn depth(&mut self, val: bool) -> &mut Self { - self.depth_shim(val); + self.set_depth(val); self } - #[doc = "Change the `failIfMajorPerformanceCaveat` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_fail_if_major_performance_caveat()` instead."] pub fn fail_if_major_performance_caveat(&mut self, val: bool) -> &mut Self { - self.fail_if_major_performance_caveat_shim(val); + self.set_fail_if_major_performance_caveat(val); self } #[cfg(feature = "WebGlPowerPreference")] - #[doc = "Change the `powerPreference` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] + #[deprecated = "Use `set_power_preference()` instead."] pub fn power_preference(&mut self, val: WebGlPowerPreference) -> &mut Self { - self.power_preference_shim(val); + self.set_power_preference(val); self } - #[doc = "Change the `premultipliedAlpha` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_premultiplied_alpha()` instead."] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { - self.premultiplied_alpha_shim(val); + self.set_premultiplied_alpha(val); self } - #[doc = "Change the `preserveDrawingBuffer` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_preserve_drawing_buffer()` instead."] pub fn preserve_drawing_buffer(&mut self, val: bool) -> &mut Self { - self.preserve_drawing_buffer_shim(val); + self.set_preserve_drawing_buffer(val); self } - #[doc = "Change the `stencil` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[deprecated = "Use `set_stencil()` instead."] pub fn stencil(&mut self, val: bool) -> &mut Self { - self.stencil_shim(val); + self.set_stencil(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `xrCompatible` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_xr_compatible()` instead."] pub fn xr_compatible(&mut self, val: bool) -> &mut Self { - self.xr_compatible_shim(val); + self.set_xr_compatible(val); self } } diff --git a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs index 870603872a7..fff5f4f4790 100644 --- a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs +++ b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs @@ -10,14 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub type WebGlContextEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &WebGlContextEventInit, val: bool); + pub fn set_bubbles(this: &WebGlContextEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &WebGlContextEventInit, val: bool); + pub fn set_cancelable(this: &WebGlContextEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &WebGlContextEventInit, val: bool); + pub fn set_composed(this: &WebGlContextEventInit, val: bool); + #[doc = "Get the `statusMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[wasm_bindgen(method, getter = "statusMessage")] + pub fn get_status_message(this: &WebGlContextEventInit) -> Option; + #[doc = "Change the `statusMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] #[wasm_bindgen(method, setter = "statusMessage")] - fn status_message_shim(this: &WebGlContextEventInit, val: &str); + pub fn set_status_message(this: &WebGlContextEventInit, val: &str); } impl WebGlContextEventInit { #[doc = "Construct a new `WebGlContextEventInit`."] @@ -28,32 +60,24 @@ impl WebGlContextEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `statusMessage` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + #[deprecated = "Use `set_status_message()` instead."] pub fn status_message(&mut self, val: &str) -> &mut Self { - self.status_message_shim(val); + self.set_status_message(val); self } } diff --git a/crates/web-sys/src/features/gen_WebSocketDict.rs b/crates/web-sys/src/features/gen_WebSocketDict.rs index 1586581b065..752934754b9 100644 --- a/crates/web-sys/src/features/gen_WebSocketDict.rs +++ b/crates/web-sys/src/features/gen_WebSocketDict.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] pub type WebSocketDict; + #[doc = "Get the `websockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] + #[wasm_bindgen(method, getter = "websockets")] + pub fn get_websockets(this: &WebSocketDict) -> Option<::js_sys::Array>; + #[doc = "Change the `websockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] #[wasm_bindgen(method, setter = "websockets")] - fn websockets_shim(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); + pub fn set_websockets(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); } impl WebSocketDict { #[doc = "Construct a new `WebSocketDict`."] @@ -22,11 +30,9 @@ impl WebSocketDict { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `websockets` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] + #[deprecated = "Use `set_websockets()` instead."] pub fn websockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.websockets_shim(val); + self.set_websockets(val); self } } diff --git a/crates/web-sys/src/features/gen_WebSocketElement.rs b/crates/web-sys/src/features/gen_WebSocketElement.rs index ebe600ee7b1..7c6d3464b56 100644 --- a/crates/web-sys/src/features/gen_WebSocketElement.rs +++ b/crates/web-sys/src/features/gen_WebSocketElement.rs @@ -10,18 +10,66 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub type WebSocketElement; + #[doc = "Get the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "encrypted")] + pub fn get_encrypted(this: &WebSocketElement) -> Option; + #[doc = "Change the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "encrypted")] - fn encrypted_shim(this: &WebSocketElement, val: bool); + pub fn set_encrypted(this: &WebSocketElement, val: bool); + #[doc = "Get the `hostport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "hostport")] + pub fn get_hostport(this: &WebSocketElement) -> Option; + #[doc = "Change the `hostport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "hostport")] - fn hostport_shim(this: &WebSocketElement, val: &str); + pub fn set_hostport(this: &WebSocketElement, val: &str); + #[doc = "Get the `msgreceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "msgreceived")] + pub fn get_msgreceived(this: &WebSocketElement) -> Option; + #[doc = "Change the `msgreceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "msgreceived")] - fn msgreceived_shim(this: &WebSocketElement, val: u32); + pub fn set_msgreceived(this: &WebSocketElement, val: u32); + #[doc = "Get the `msgsent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "msgsent")] + pub fn get_msgsent(this: &WebSocketElement) -> Option; + #[doc = "Change the `msgsent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "msgsent")] - fn msgsent_shim(this: &WebSocketElement, val: u32); + pub fn set_msgsent(this: &WebSocketElement, val: u32); + #[doc = "Get the `receivedsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "receivedsize")] + pub fn get_receivedsize(this: &WebSocketElement) -> Option; + #[doc = "Change the `receivedsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "receivedsize")] - fn receivedsize_shim(this: &WebSocketElement, val: f64); + pub fn set_receivedsize(this: &WebSocketElement, val: f64); + #[doc = "Get the `sentsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[wasm_bindgen(method, getter = "sentsize")] + pub fn get_sentsize(this: &WebSocketElement) -> Option; + #[doc = "Change the `sentsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] #[wasm_bindgen(method, setter = "sentsize")] - fn sentsize_shim(this: &WebSocketElement, val: f64); + pub fn set_sentsize(this: &WebSocketElement, val: f64); } impl WebSocketElement { #[doc = "Construct a new `WebSocketElement`."] @@ -32,46 +80,34 @@ impl WebSocketElement { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `encrypted` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_encrypted()` instead."] pub fn encrypted(&mut self, val: bool) -> &mut Self { - self.encrypted_shim(val); + self.set_encrypted(val); self } - #[doc = "Change the `hostport` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_hostport()` instead."] pub fn hostport(&mut self, val: &str) -> &mut Self { - self.hostport_shim(val); + self.set_hostport(val); self } - #[doc = "Change the `msgreceived` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_msgreceived()` instead."] pub fn msgreceived(&mut self, val: u32) -> &mut Self { - self.msgreceived_shim(val); + self.set_msgreceived(val); self } - #[doc = "Change the `msgsent` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_msgsent()` instead."] pub fn msgsent(&mut self, val: u32) -> &mut Self { - self.msgsent_shim(val); + self.set_msgsent(val); self } - #[doc = "Change the `receivedsize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_receivedsize()` instead."] pub fn receivedsize(&mut self, val: f64) -> &mut Self { - self.receivedsize_shim(val); + self.set_receivedsize(val); self } - #[doc = "Change the `sentsize` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + #[deprecated = "Use `set_sentsize()` instead."] pub fn sentsize(&mut self, val: f64) -> &mut Self { - self.sentsize_shim(val); + self.set_sentsize(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs index 28ef40240d5..d33023f8870 100644 --- a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs +++ b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportCloseInfo; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `closeCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "closeCode")] + pub fn get_close_code(this: &WebTransportCloseInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `closeCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "closeCode")] - fn close_code_shim(this: &WebTransportCloseInfo, val: u32); + pub fn set_close_code(this: &WebTransportCloseInfo, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "reason")] + pub fn get_reason(this: &WebTransportCloseInfo) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &WebTransportCloseInfo, val: &str); + pub fn set_reason(this: &WebTransportCloseInfo, val: &str); } #[cfg(web_sys_unstable_apis)] impl WebTransportCloseInfo { @@ -33,25 +65,15 @@ impl WebTransportCloseInfo { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `closeCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_close_code()` instead."] pub fn close_code(&mut self, val: u32) -> &mut Self { - self.close_code_shim(val); + self.set_close_code(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `reason` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reason()` instead."] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs index 70def34726b..22cd239a268 100644 --- a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportDatagramStats; - #[wasm_bindgen(method, setter = "droppedIncoming")] - fn dropped_incoming_shim(this: &WebTransportDatagramStats, val: f64); - #[wasm_bindgen(method, setter = "expiredOutgoing")] - fn expired_outgoing_shim(this: &WebTransportDatagramStats, val: f64); - #[wasm_bindgen(method, setter = "lostOutgoing")] - fn lost_outgoing_shim(this: &WebTransportDatagramStats, val: f64); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportDatagramStats, val: f64); -} -#[cfg(web_sys_unstable_apis)] -impl WebTransportDatagramStats { - #[doc = "Construct a new `WebTransportDatagramStats`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `droppedIncoming` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "droppedIncoming")] + pub fn get_dropped_incoming(this: &WebTransportDatagramStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `droppedIncoming` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl WebTransportDatagramStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn dropped_incoming(&mut self, val: f64) -> &mut Self { - self.dropped_incoming_shim(val); - self - } + #[wasm_bindgen(method, setter = "droppedIncoming")] + pub fn set_dropped_incoming(this: &WebTransportDatagramStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `expiredOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "expiredOutgoing")] + pub fn get_expired_outgoing(this: &WebTransportDatagramStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `expiredOutgoing` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl WebTransportDatagramStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn expired_outgoing(&mut self, val: f64) -> &mut Self { - self.expired_outgoing_shim(val); - self - } + #[wasm_bindgen(method, setter = "expiredOutgoing")] + pub fn set_expired_outgoing(this: &WebTransportDatagramStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lostOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "lostOutgoing")] + pub fn get_lost_outgoing(this: &WebTransportDatagramStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `lostOutgoing` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl WebTransportDatagramStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn lost_outgoing(&mut self, val: f64) -> &mut Self { - self.lost_outgoing_shim(val); - self - } + #[wasm_bindgen(method, setter = "lostOutgoing")] + pub fn set_lost_outgoing(this: &WebTransportDatagramStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &WebTransportDatagramStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl WebTransportDatagramStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &WebTransportDatagramStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportDatagramStats { + #[doc = "Construct a new `WebTransportDatagramStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_dropped_incoming()` instead."] + pub fn dropped_incoming(&mut self, val: f64) -> &mut Self { + self.set_dropped_incoming(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_expired_outgoing()` instead."] + pub fn expired_outgoing(&mut self, val: f64) -> &mut Self { + self.set_expired_outgoing(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_lost_outgoing()` instead."] + pub fn lost_outgoing(&mut self, val: f64) -> &mut Self { + self.set_lost_outgoing(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs index 05069e0a71c..06a6c9dd632 100644 --- a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs @@ -14,11 +14,44 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportErrorOptions; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportErrorSource")] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "source")] + pub fn get_source(this: &WebTransportErrorOptions) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportErrorSource")] + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &WebTransportErrorOptions, val: WebTransportErrorSource); + pub fn set_source(this: &WebTransportErrorOptions, val: WebTransportErrorSource); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `streamErrorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "streamErrorCode")] + pub fn get_stream_error_code(this: &WebTransportErrorOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `streamErrorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "streamErrorCode")] - fn stream_error_code_shim(this: &WebTransportErrorOptions, val: Option); + pub fn set_stream_error_code(this: &WebTransportErrorOptions, val: Option); } #[cfg(web_sys_unstable_apis)] impl WebTransportErrorOptions { @@ -35,25 +68,15 @@ impl WebTransportErrorOptions { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportErrorSource")] - #[doc = "Change the `source` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_source()` instead."] pub fn source(&mut self, val: WebTransportErrorSource) -> &mut Self { - self.source_shim(val); + self.set_source(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `streamErrorCode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_stream_error_code()` instead."] pub fn stream_error_code(&mut self, val: Option) -> &mut Self { - self.stream_error_code_shim(val); + self.set_stream_error_code(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportHash.rs b/crates/web-sys/src/features/gen_WebTransportHash.rs index 46c4052620a..0a897b9f611 100644 --- a/crates/web-sys/src/features/gen_WebTransportHash.rs +++ b/crates/web-sys/src/features/gen_WebTransportHash.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportHash; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `algorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "algorithm")] + pub fn get_algorithm(this: &WebTransportHash) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `algorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "algorithm")] - fn algorithm_shim(this: &WebTransportHash, val: &str); + pub fn set_algorithm(this: &WebTransportHash, val: &str); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "value")] + pub fn get_value(this: &WebTransportHash) -> Option<::js_sys::Object>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &WebTransportHash, val: &::js_sys::Object); + pub fn set_value(this: &WebTransportHash, val: &::js_sys::Object); } #[cfg(web_sys_unstable_apis)] impl WebTransportHash { @@ -33,25 +65,15 @@ impl WebTransportHash { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `algorithm` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_algorithm()` instead."] pub fn algorithm(&mut self, val: &str) -> &mut Self { - self.algorithm_shim(val); + self.set_algorithm(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `value` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_value()` instead."] pub fn value(&mut self, val: &::js_sys::Object) -> &mut Self { - self.value_shim(val); + self.set_value(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportOptions.rs b/crates/web-sys/src/features/gen_WebTransportOptions.rs index bd20cadbb79..bc293195182 100644 --- a/crates/web-sys/src/features/gen_WebTransportOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportOptions.rs @@ -14,29 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportOptions; - #[wasm_bindgen(method, setter = "allowPooling")] - fn allow_pooling_shim(this: &WebTransportOptions, val: bool); - #[cfg(feature = "WebTransportCongestionControl")] - #[wasm_bindgen(method, setter = "congestionControl")] - fn congestion_control_shim(this: &WebTransportOptions, val: WebTransportCongestionControl); - #[wasm_bindgen(method, setter = "requireUnreliable")] - fn require_unreliable_shim(this: &WebTransportOptions, val: bool); - #[wasm_bindgen(method, setter = "serverCertificateHashes")] - fn server_certificate_hashes_shim(this: &WebTransportOptions, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl WebTransportOptions { - #[doc = "Construct a new `WebTransportOptions`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowPooling` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "allowPooling")] + pub fn get_allow_pooling(this: &WebTransportOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `allowPooling` field of this object."] #[doc = ""] @@ -44,10 +30,20 @@ impl WebTransportOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn allow_pooling(&mut self, val: bool) -> &mut Self { - self.allow_pooling_shim(val); - self - } + #[wasm_bindgen(method, setter = "allowPooling")] + pub fn set_allow_pooling(this: &WebTransportOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportCongestionControl")] + #[doc = "Get the `congestionControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCongestionControl`, `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "congestionControl")] + pub fn get_congestion_control( + this: &WebTransportOptions, + ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportCongestionControl")] #[doc = "Change the `congestionControl` field of this object."] @@ -56,10 +52,17 @@ impl WebTransportOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn congestion_control(&mut self, val: WebTransportCongestionControl) -> &mut Self { - self.congestion_control_shim(val); - self - } + #[wasm_bindgen(method, setter = "congestionControl")] + pub fn set_congestion_control(this: &WebTransportOptions, val: WebTransportCongestionControl); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requireUnreliable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requireUnreliable")] + pub fn get_require_unreliable(this: &WebTransportOptions) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `requireUnreliable` field of this object."] #[doc = ""] @@ -67,10 +70,17 @@ impl WebTransportOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn require_unreliable(&mut self, val: bool) -> &mut Self { - self.require_unreliable_shim(val); - self - } + #[wasm_bindgen(method, setter = "requireUnreliable")] + pub fn set_require_unreliable(this: &WebTransportOptions, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serverCertificateHashes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "serverCertificateHashes")] + pub fn get_server_certificate_hashes(this: &WebTransportOptions) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `serverCertificateHashes` field of this object."] #[doc = ""] @@ -78,8 +88,45 @@ impl WebTransportOptions { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "serverCertificateHashes")] + pub fn set_server_certificate_hashes(this: &WebTransportOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportOptions { + #[doc = "Construct a new `WebTransportOptions`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_allow_pooling()` instead."] + pub fn allow_pooling(&mut self, val: bool) -> &mut Self { + self.set_allow_pooling(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportCongestionControl")] + #[deprecated = "Use `set_congestion_control()` instead."] + pub fn congestion_control(&mut self, val: WebTransportCongestionControl) -> &mut Self { + self.set_congestion_control(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_require_unreliable()` instead."] + pub fn require_unreliable(&mut self, val: bool) -> &mut Self { + self.set_require_unreliable(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_server_certificate_hashes()` instead."] pub fn server_certificate_hashes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.server_certificate_hashes_shim(val); + self.set_server_certificate_hashes(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs index 61a4c3d60c6..51efe4f837b 100644 --- a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs @@ -14,26 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportReceiveStreamStats; - #[wasm_bindgen(method, setter = "bytesRead")] - fn bytes_read_shim(this: &WebTransportReceiveStreamStats, val: f64); - #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &WebTransportReceiveStreamStats, val: f64); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportReceiveStreamStats, val: f64); -} -#[cfg(web_sys_unstable_apis)] -impl WebTransportReceiveStreamStats { - #[doc = "Construct a new `WebTransportReceiveStreamStats`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesRead` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "bytesRead")] + pub fn get_bytes_read(this: &WebTransportReceiveStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesRead` field of this object."] #[doc = ""] @@ -41,10 +30,17 @@ impl WebTransportReceiveStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_read(&mut self, val: f64) -> &mut Self { - self.bytes_read_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesRead")] + pub fn set_bytes_read(this: &WebTransportReceiveStreamStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &WebTransportReceiveStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] @@ -52,10 +48,17 @@ impl WebTransportReceiveStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesReceived")] + pub fn set_bytes_received(this: &WebTransportReceiveStreamStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &WebTransportReceiveStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -63,8 +66,38 @@ impl WebTransportReceiveStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &WebTransportReceiveStreamStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportReceiveStreamStats { + #[doc = "Construct a new `WebTransportReceiveStreamStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_read()` instead."] + pub fn bytes_read(&mut self, val: f64) -> &mut Self { + self.set_bytes_read(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_received()` instead."] + pub fn bytes_received(&mut self, val: f64) -> &mut Self { + self.set_bytes_received(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs index d4b1ee2cd93..8b7b073e0aa 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs @@ -14,8 +14,24 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportSendStreamOptions; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sendOrder` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "sendOrder")] + pub fn get_send_order(this: &WebTransportSendStreamOptions) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `sendOrder` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "sendOrder")] - fn send_order_shim(this: &WebTransportSendStreamOptions, val: Option); + pub fn set_send_order(this: &WebTransportSendStreamOptions, val: Option); } #[cfg(web_sys_unstable_apis)] impl WebTransportSendStreamOptions { @@ -31,14 +47,9 @@ impl WebTransportSendStreamOptions { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `sendOrder` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_send_order()` instead."] pub fn send_order(&mut self, val: Option) -> &mut Self { - self.send_order_shim(val); + self.set_send_order(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs index 373f9a7bc13..e7f14805c32 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs @@ -14,28 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportSendStreamStats; - #[wasm_bindgen(method, setter = "bytesAcknowledged")] - fn bytes_acknowledged_shim(this: &WebTransportSendStreamStats, val: f64); - #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &WebTransportSendStreamStats, val: f64); - #[wasm_bindgen(method, setter = "bytesWritten")] - fn bytes_written_shim(this: &WebTransportSendStreamStats, val: f64); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportSendStreamStats, val: f64); -} -#[cfg(web_sys_unstable_apis)] -impl WebTransportSendStreamStats { - #[doc = "Construct a new `WebTransportSendStreamStats`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesAcknowledged` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "bytesAcknowledged")] + pub fn get_bytes_acknowledged(this: &WebTransportSendStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesAcknowledged` field of this object."] #[doc = ""] @@ -43,10 +30,17 @@ impl WebTransportSendStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_acknowledged(&mut self, val: f64) -> &mut Self { - self.bytes_acknowledged_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesAcknowledged")] + pub fn set_bytes_acknowledged(this: &WebTransportSendStreamStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &WebTransportSendStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] @@ -54,10 +48,17 @@ impl WebTransportSendStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesSent")] + pub fn set_bytes_sent(this: &WebTransportSendStreamStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesWritten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytesWritten")] + pub fn get_bytes_written(this: &WebTransportSendStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesWritten` field of this object."] #[doc = ""] @@ -65,10 +66,17 @@ impl WebTransportSendStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_written(&mut self, val: f64) -> &mut Self { - self.bytes_written_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesWritten")] + pub fn set_bytes_written(this: &WebTransportSendStreamStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &WebTransportSendStreamStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -76,8 +84,44 @@ impl WebTransportSendStreamStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &WebTransportSendStreamStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportSendStreamStats { + #[doc = "Construct a new `WebTransportSendStreamStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_acknowledged()` instead."] + pub fn bytes_acknowledged(&mut self, val: f64) -> &mut Self { + self.set_bytes_acknowledged(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_sent()` instead."] + pub fn bytes_sent(&mut self, val: f64) -> &mut Self { + self.set_bytes_sent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_written()` instead."] + pub fn bytes_written(&mut self, val: f64) -> &mut Self { + self.set_bytes_written(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportStats.rs b/crates/web-sys/src/features/gen_WebTransportStats.rs index bc2b8fd4347..175fc01ee29 100644 --- a/crates/web-sys/src/features/gen_WebTransportStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportStats.rs @@ -14,45 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportStats; - #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &WebTransportStats, val: f64); - #[cfg(feature = "WebTransportDatagramStats")] - #[wasm_bindgen(method, setter = "datagrams")] - fn datagrams_shim(this: &WebTransportStats, val: &WebTransportDatagramStats); - #[wasm_bindgen(method, setter = "minRtt")] - fn min_rtt_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "numIncomingStreamsCreated")] - fn num_incoming_streams_created_shim(this: &WebTransportStats, val: u32); - #[wasm_bindgen(method, setter = "numOutgoingStreamsCreated")] - fn num_outgoing_streams_created_shim(this: &WebTransportStats, val: u32); - #[wasm_bindgen(method, setter = "packetsLost")] - fn packets_lost_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "packetsReceived")] - fn packets_received_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "packetsSent")] - fn packets_sent_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "rttVariation")] - fn rtt_variation_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "smoothedRtt")] - fn smoothed_rtt_shim(this: &WebTransportStats, val: f64); - #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportStats, val: f64); -} -#[cfg(web_sys_unstable_apis)] -impl WebTransportStats { - #[doc = "Construct a new `WebTransportStats`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "bytesReceived")] + pub fn get_bytes_received(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] @@ -60,10 +30,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesReceived")] + pub fn set_bytes_received(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bytesSent")] + pub fn get_bytes_sent(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] @@ -71,10 +48,18 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); - self - } + #[wasm_bindgen(method, setter = "bytesSent")] + pub fn set_bytes_sent(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportDatagramStats")] + #[doc = "Get the `datagrams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`, `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "datagrams")] + pub fn get_datagrams(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WebTransportDatagramStats")] #[doc = "Change the `datagrams` field of this object."] @@ -83,10 +68,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn datagrams(&mut self, val: &WebTransportDatagramStats) -> &mut Self { - self.datagrams_shim(val); - self - } + #[wasm_bindgen(method, setter = "datagrams")] + pub fn set_datagrams(this: &WebTransportStats, val: &WebTransportDatagramStats); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `minRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "minRtt")] + pub fn get_min_rtt(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `minRtt` field of this object."] #[doc = ""] @@ -94,10 +86,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn min_rtt(&mut self, val: f64) -> &mut Self { - self.min_rtt_shim(val); - self - } + #[wasm_bindgen(method, setter = "minRtt")] + pub fn set_min_rtt(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numIncomingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numIncomingStreamsCreated")] + pub fn get_num_incoming_streams_created(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `numIncomingStreamsCreated` field of this object."] #[doc = ""] @@ -105,10 +104,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn num_incoming_streams_created(&mut self, val: u32) -> &mut Self { - self.num_incoming_streams_created_shim(val); - self - } + #[wasm_bindgen(method, setter = "numIncomingStreamsCreated")] + pub fn set_num_incoming_streams_created(this: &WebTransportStats, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numOutgoingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "numOutgoingStreamsCreated")] + pub fn get_num_outgoing_streams_created(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `numOutgoingStreamsCreated` field of this object."] #[doc = ""] @@ -116,10 +122,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn num_outgoing_streams_created(&mut self, val: u32) -> &mut Self { - self.num_outgoing_streams_created_shim(val); - self - } + #[wasm_bindgen(method, setter = "numOutgoingStreamsCreated")] + pub fn set_num_outgoing_streams_created(this: &WebTransportStats, val: u32); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "packetsLost")] + pub fn get_packets_lost(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `packetsLost` field of this object."] #[doc = ""] @@ -127,10 +140,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn packets_lost(&mut self, val: f64) -> &mut Self { - self.packets_lost_shim(val); - self - } + #[wasm_bindgen(method, setter = "packetsLost")] + pub fn set_packets_lost(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "packetsReceived")] + pub fn get_packets_received(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `packetsReceived` field of this object."] #[doc = ""] @@ -138,10 +158,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn packets_received(&mut self, val: f64) -> &mut Self { - self.packets_received_shim(val); - self - } + #[wasm_bindgen(method, setter = "packetsReceived")] + pub fn set_packets_received(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "packetsSent")] + pub fn get_packets_sent(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `packetsSent` field of this object."] #[doc = ""] @@ -149,10 +176,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn packets_sent(&mut self, val: f64) -> &mut Self { - self.packets_sent_shim(val); - self - } + #[wasm_bindgen(method, setter = "packetsSent")] + pub fn set_packets_sent(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rttVariation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "rttVariation")] + pub fn get_rtt_variation(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `rttVariation` field of this object."] #[doc = ""] @@ -160,10 +194,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn rtt_variation(&mut self, val: f64) -> &mut Self { - self.rtt_variation_shim(val); - self - } + #[wasm_bindgen(method, setter = "rttVariation")] + pub fn set_rtt_variation(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `smoothedRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "smoothedRtt")] + pub fn get_smoothed_rtt(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `smoothedRtt` field of this object."] #[doc = ""] @@ -171,10 +212,17 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn smoothed_rtt(&mut self, val: f64) -> &mut Self { - self.smoothed_rtt_shim(val); - self - } + #[wasm_bindgen(method, setter = "smoothedRtt")] + pub fn set_smoothed_rtt(this: &WebTransportStats, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "timestamp")] + pub fn get_timestamp(this: &WebTransportStats) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `timestamp` field of this object."] #[doc = ""] @@ -182,8 +230,93 @@ impl WebTransportStats { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "timestamp")] + pub fn set_timestamp(this: &WebTransportStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportStats { + #[doc = "Construct a new `WebTransportStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_received()` instead."] + pub fn bytes_received(&mut self, val: f64) -> &mut Self { + self.set_bytes_received(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_bytes_sent()` instead."] + pub fn bytes_sent(&mut self, val: f64) -> &mut Self { + self.set_bytes_sent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportDatagramStats")] + #[deprecated = "Use `set_datagrams()` instead."] + pub fn datagrams(&mut self, val: &WebTransportDatagramStats) -> &mut Self { + self.set_datagrams(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_min_rtt()` instead."] + pub fn min_rtt(&mut self, val: f64) -> &mut Self { + self.set_min_rtt(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_num_incoming_streams_created()` instead."] + pub fn num_incoming_streams_created(&mut self, val: u32) -> &mut Self { + self.set_num_incoming_streams_created(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_num_outgoing_streams_created()` instead."] + pub fn num_outgoing_streams_created(&mut self, val: u32) -> &mut Self { + self.set_num_outgoing_streams_created(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_packets_lost()` instead."] + pub fn packets_lost(&mut self, val: f64) -> &mut Self { + self.set_packets_lost(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_packets_received()` instead."] + pub fn packets_received(&mut self, val: f64) -> &mut Self { + self.set_packets_received(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_packets_sent()` instead."] + pub fn packets_sent(&mut self, val: f64) -> &mut Self { + self.set_packets_sent(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_rtt_variation()` instead."] + pub fn rtt_variation(&mut self, val: f64) -> &mut Self { + self.set_rtt_variation(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_smoothed_rtt()` instead."] + pub fn smoothed_rtt(&mut self, val: f64) -> &mut Self { + self.set_smoothed_rtt(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_timestamp()` instead."] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp(val); self } } diff --git a/crates/web-sys/src/features/gen_WheelEventInit.rs b/crates/web-sys/src/features/gen_WheelEventInit.rs index 26a815349b6..f8e734ab832 100644 --- a/crates/web-sys/src/features/gen_WheelEventInit.rs +++ b/crates/web-sys/src/features/gen_WheelEventInit.rs @@ -10,70 +10,320 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub type WheelEventInit; + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &WheelEventInit) -> Option; + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &WheelEventInit, val: bool); + pub fn set_bubbles(this: &WheelEventInit, val: bool); + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &WheelEventInit) -> Option; + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &WheelEventInit, val: bool); + pub fn set_cancelable(this: &WheelEventInit, val: bool); + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &WheelEventInit) -> Option; + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &WheelEventInit, val: bool); + pub fn set_composed(this: &WheelEventInit, val: bool); + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "detail")] + pub fn get_detail(this: &WheelEventInit) -> Option; + #[doc = "Change the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &WheelEventInit, val: i32); + pub fn set_detail(this: &WheelEventInit, val: i32); #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] + #[wasm_bindgen(method, getter = "view")] + pub fn get_view(this: &WheelEventInit) -> Option; + #[cfg(feature = "Window")] + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &WheelEventInit, val: Option<&Window>); + pub fn set_view(this: &WheelEventInit, val: Option<&Window>); + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "altKey")] + pub fn get_alt_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &WheelEventInit, val: bool); + pub fn set_alt_key(this: &WheelEventInit, val: bool); + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "ctrlKey")] + pub fn get_ctrl_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &WheelEventInit, val: bool); + pub fn set_ctrl_key(this: &WheelEventInit, val: bool); + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "metaKey")] + pub fn get_meta_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &WheelEventInit, val: bool); + pub fn set_meta_key(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierAltGraph")] + pub fn get_modifier_alt_graph(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_alt_graph(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierCapsLock")] + pub fn get_modifier_caps_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_caps_lock(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFn")] + pub fn get_modifier_fn(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_fn(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierFnLock")] + pub fn get_modifier_fn_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_fn_lock(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierNumLock")] + pub fn get_modifier_num_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_num_lock(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierOS")] + pub fn get_modifier_os(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_os(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierScrollLock")] + pub fn get_modifier_scroll_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_scroll_lock(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbol")] + pub fn get_modifier_symbol(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_symbol(this: &WheelEventInit, val: bool); + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + pub fn get_modifier_symbol_lock(this: &WheelEventInit) -> Option; + #[doc = "Change the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &WheelEventInit, val: bool); + pub fn set_modifier_symbol_lock(this: &WheelEventInit, val: bool); + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "shiftKey")] + pub fn get_shift_key(this: &WheelEventInit) -> Option; + #[doc = "Change the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &WheelEventInit, val: bool); + pub fn set_shift_key(this: &WheelEventInit, val: bool); + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "button")] + pub fn get_button(this: &WheelEventInit) -> Option; + #[doc = "Change the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &WheelEventInit, val: i16); + pub fn set_button(this: &WheelEventInit, val: i16); + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "buttons")] + pub fn get_buttons(this: &WheelEventInit) -> Option; + #[doc = "Change the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &WheelEventInit, val: u16); + pub fn set_buttons(this: &WheelEventInit, val: u16); + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "clientX")] + pub fn get_client_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &WheelEventInit, val: i32); + pub fn set_client_x(this: &WheelEventInit, val: i32); + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "clientY")] + pub fn get_client_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &WheelEventInit, val: i32); + pub fn set_client_y(this: &WheelEventInit, val: i32); + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "movementX")] + pub fn get_movement_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &WheelEventInit, val: i32); + pub fn set_movement_x(this: &WheelEventInit, val: i32); + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "movementY")] + pub fn get_movement_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &WheelEventInit, val: i32); + pub fn set_movement_y(this: &WheelEventInit, val: i32); #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "relatedTarget")] + pub fn get_related_target(this: &WheelEventInit) -> Option; + #[cfg(feature = "EventTarget")] + #[doc = "Change the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &WheelEventInit, val: Option<&EventTarget>); + pub fn set_related_target(this: &WheelEventInit, val: Option<&EventTarget>); + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "screenX")] + pub fn get_screen_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &WheelEventInit, val: i32); + pub fn set_screen_x(this: &WheelEventInit, val: i32); + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "screenY")] + pub fn get_screen_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &WheelEventInit, val: i32); + pub fn set_screen_y(this: &WheelEventInit, val: i32); + #[doc = "Get the `deltaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "deltaMode")] + pub fn get_delta_mode(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaMode")] - fn delta_mode_shim(this: &WheelEventInit, val: u32); + pub fn set_delta_mode(this: &WheelEventInit, val: u32); + #[doc = "Get the `deltaX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "deltaX")] + pub fn get_delta_x(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaX")] - fn delta_x_shim(this: &WheelEventInit, val: f64); + pub fn set_delta_x(this: &WheelEventInit, val: f64); + #[doc = "Get the `deltaY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "deltaY")] + pub fn get_delta_y(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaY")] - fn delta_y_shim(this: &WheelEventInit, val: f64); + pub fn set_delta_y(this: &WheelEventInit, val: f64); + #[doc = "Get the `deltaZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[wasm_bindgen(method, getter = "deltaZ")] + pub fn get_delta_z(this: &WheelEventInit) -> Option; + #[doc = "Change the `deltaZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] #[wasm_bindgen(method, setter = "deltaZ")] - fn delta_z_shim(this: &WheelEventInit, val: f64); + pub fn set_delta_z(this: &WheelEventInit, val: f64); } impl WheelEventInit { #[doc = "Construct a new `WheelEventInit`."] @@ -84,223 +334,161 @@ impl WheelEventInit { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } - #[doc = "Change the `detail` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_detail()` instead."] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail(val); self } #[cfg(feature = "Window")] - #[doc = "Change the `view` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] + #[deprecated = "Use `set_view()` instead."] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view(val); self } - #[doc = "Change the `altKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_alt_key()` instead."] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key(val); self } - #[doc = "Change the `ctrlKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_ctrl_key()` instead."] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key(val); self } - #[doc = "Change the `metaKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_meta_key()` instead."] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key(val); self } - #[doc = "Change the `modifierAltGraph` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_alt_graph()` instead."] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph(val); self } - #[doc = "Change the `modifierCapsLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_caps_lock()` instead."] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock(val); self } - #[doc = "Change the `modifierFn` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_fn()` instead."] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn(val); self } - #[doc = "Change the `modifierFnLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_fn_lock()` instead."] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock(val); self } - #[doc = "Change the `modifierNumLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_num_lock()` instead."] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock(val); self } - #[doc = "Change the `modifierOS` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_os()` instead."] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os(val); self } - #[doc = "Change the `modifierScrollLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_scroll_lock()` instead."] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock(val); self } - #[doc = "Change the `modifierSymbol` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_symbol()` instead."] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol(val); self } - #[doc = "Change the `modifierSymbolLock` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_modifier_symbol_lock()` instead."] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock(val); self } - #[doc = "Change the `shiftKey` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_shift_key()` instead."] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key(val); self } - #[doc = "Change the `button` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_button()` instead."] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button(val); self } - #[doc = "Change the `buttons` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_buttons()` instead."] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons(val); self } - #[doc = "Change the `clientX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_client_x()` instead."] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x(val); self } - #[doc = "Change the `clientY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_client_y()` instead."] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y(val); self } - #[doc = "Change the `movementX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_movement_x()` instead."] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x(val); self } - #[doc = "Change the `movementY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_movement_y()` instead."] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y(val); self } #[cfg(feature = "EventTarget")] - #[doc = "Change the `relatedTarget` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] + #[deprecated = "Use `set_related_target()` instead."] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target(val); self } - #[doc = "Change the `screenX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_screen_x()` instead."] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x(val); self } - #[doc = "Change the `screenY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_screen_y()` instead."] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y(val); self } - #[doc = "Change the `deltaMode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_mode()` instead."] pub fn delta_mode(&mut self, val: u32) -> &mut Self { - self.delta_mode_shim(val); + self.set_delta_mode(val); self } - #[doc = "Change the `deltaX` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_x()` instead."] pub fn delta_x(&mut self, val: f64) -> &mut Self { - self.delta_x_shim(val); + self.set_delta_x(val); self } - #[doc = "Change the `deltaY` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_y()` instead."] pub fn delta_y(&mut self, val: f64) -> &mut Self { - self.delta_y_shim(val); + self.set_delta_y(val); self } - #[doc = "Change the `deltaZ` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + #[deprecated = "Use `set_delta_z()` instead."] pub fn delta_z(&mut self, val: f64) -> &mut Self { - self.delta_z_shim(val); + self.set_delta_z(val); self } } diff --git a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs index 18a7300b0a1..a9ae7990833 100644 --- a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs +++ b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs @@ -10,20 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub type WidevineCdmManifest; + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "description")] + pub fn get_description(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_description(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_name(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "version")] + pub fn get_version(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_version(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `x-cdm-codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "x-cdm-codecs")] + pub fn get_x_cdm_codecs(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-codecs")] - fn x_cdm_codecs_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_codecs(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `x-cdm-host-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "x-cdm-host-versions")] + pub fn get_x_cdm_host_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-host-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-host-versions")] - fn x_cdm_host_versions_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_host_versions(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `x-cdm-interface-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "x-cdm-interface-versions")] + pub fn get_x_cdm_interface_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-interface-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-interface-versions")] - fn x_cdm_interface_versions_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_interface_versions(this: &WidevineCdmManifest, val: &str); + #[doc = "Get the `x-cdm-module-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[wasm_bindgen(method, getter = "x-cdm-module-versions")] + pub fn get_x_cdm_module_versions(this: &WidevineCdmManifest) -> String; + #[doc = "Change the `x-cdm-module-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] #[wasm_bindgen(method, setter = "x-cdm-module-versions")] - fn x_cdm_module_versions_shim(this: &WidevineCdmManifest, val: &str); + pub fn set_x_cdm_module_versions(this: &WidevineCdmManifest, val: &str); } impl WidevineCdmManifest { #[doc = "Construct a new `WidevineCdmManifest`."] @@ -49,53 +105,39 @@ impl WidevineCdmManifest { ret.x_cdm_module_versions(x_cdm_module_versions); ret } - #[doc = "Change the `description` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_description()` instead."] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } - #[doc = "Change the `version` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_version()` instead."] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version(val); self } - #[doc = "Change the `x-cdm-codecs` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_codecs()` instead."] pub fn x_cdm_codecs(&mut self, val: &str) -> &mut Self { - self.x_cdm_codecs_shim(val); + self.set_x_cdm_codecs(val); self } - #[doc = "Change the `x-cdm-host-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_host_versions()` instead."] pub fn x_cdm_host_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_host_versions_shim(val); + self.set_x_cdm_host_versions(val); self } - #[doc = "Change the `x-cdm-interface-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_interface_versions()` instead."] pub fn x_cdm_interface_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_interface_versions_shim(val); + self.set_x_cdm_interface_versions(val); self } - #[doc = "Change the `x-cdm-module-versions` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + #[deprecated = "Use `set_x_cdm_module_versions()` instead."] pub fn x_cdm_module_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_module_versions_shim(val); + self.set_x_cdm_module_versions(val); self } } diff --git a/crates/web-sys/src/features/gen_WorkerOptions.rs b/crates/web-sys/src/features/gen_WorkerOptions.rs index e3f9b1edee3..e14b81609cc 100644 --- a/crates/web-sys/src/features/gen_WorkerOptions.rs +++ b/crates/web-sys/src/features/gen_WorkerOptions.rs @@ -11,13 +11,39 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] pub type WorkerOptions; #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] + #[wasm_bindgen(method, getter = "credentials")] + pub fn get_credentials(this: &WorkerOptions) -> Option; + #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &WorkerOptions, val: RequestCredentials); + pub fn set_credentials(this: &WorkerOptions, val: RequestCredentials); + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &WorkerOptions) -> Option; + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &WorkerOptions, val: &str); + pub fn set_name(this: &WorkerOptions, val: &str); + #[cfg(feature = "WorkerType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &WorkerOptions) -> Option; #[cfg(feature = "WorkerType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &WorkerOptions, val: WorkerType); + pub fn set_type(this: &WorkerOptions, val: WorkerType); } impl WorkerOptions { #[doc = "Construct a new `WorkerOptions`."] @@ -29,26 +55,20 @@ impl WorkerOptions { ret } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials(val); self } - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(feature = "WorkerType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: WorkerType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_WorkletOptions.rs b/crates/web-sys/src/features/gen_WorkletOptions.rs index 94b0e62f7ab..07089ac8d49 100644 --- a/crates/web-sys/src/features/gen_WorkletOptions.rs +++ b/crates/web-sys/src/features/gen_WorkletOptions.rs @@ -11,8 +11,17 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WorkletOptions`*"] pub type WorkletOptions; #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] + #[wasm_bindgen(method, getter = "credentials")] + pub fn get_credentials(this: &WorkletOptions) -> Option; + #[cfg(feature = "RequestCredentials")] + #[doc = "Change the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &WorkletOptions, val: RequestCredentials); + pub fn set_credentials(this: &WorkletOptions, val: RequestCredentials); } impl WorkletOptions { #[doc = "Construct a new `WorkletOptions`."] @@ -24,11 +33,9 @@ impl WorkletOptions { ret } #[cfg(feature = "RequestCredentials")] - #[doc = "Change the `credentials` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] + #[deprecated = "Use `set_credentials()` instead."] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials(val); self } } diff --git a/crates/web-sys/src/features/gen_WriteParams.rs b/crates/web-sys/src/features/gen_WriteParams.rs index 13223458c74..a8c0ac9c754 100644 --- a/crates/web-sys/src/features/gen_WriteParams.rs +++ b/crates/web-sys/src/features/gen_WriteParams.rs @@ -10,15 +10,48 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] pub type WriteParams; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[wasm_bindgen(method, getter = "data")] + pub fn get_data(this: &WriteParams) -> ::wasm_bindgen::JsValue; + #[doc = "Change the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &WriteParams, val: &::wasm_bindgen::JsValue); + pub fn set_data(this: &WriteParams, val: &::wasm_bindgen::JsValue); + #[doc = "Get the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[wasm_bindgen(method, getter = "position")] + pub fn get_position(this: &WriteParams) -> Option; + #[doc = "Change the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "position")] - fn position_shim(this: &WriteParams, val: Option); + pub fn set_position(this: &WriteParams, val: Option); + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[wasm_bindgen(method, getter = "size")] + pub fn get_size(this: &WriteParams) -> Option; + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &WriteParams, val: Option); + pub fn set_size(this: &WriteParams, val: Option); #[cfg(feature = "WriteCommandType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] + #[wasm_bindgen(method, getter = "type")] + pub fn get_type(this: &WriteParams) -> WriteCommandType; + #[cfg(feature = "WriteCommandType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &WriteParams, val: WriteCommandType); + pub fn set_type(this: &WriteParams, val: WriteCommandType); } impl WriteParams { #[cfg(feature = "WriteCommandType")] @@ -31,33 +64,25 @@ impl WriteParams { ret.type_(type_); ret } - #[doc = "Change the `data` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_data()` instead."] pub fn data(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.data_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_data(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } - #[doc = "Change the `position` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_position()` instead."] pub fn position(&mut self, val: Option) -> &mut Self { - self.position_shim(val); + self.set_position(val); self } - #[doc = "Change the `size` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + #[deprecated = "Use `set_size()` instead."] pub fn size(&mut self, val: Option) -> &mut Self { - self.size_shim(val); + self.set_size(val); self } #[cfg(feature = "WriteCommandType")] - #[doc = "Change the `type` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] + #[deprecated = "Use `set_type()` instead."] pub fn type_(&mut self, val: WriteCommandType) -> &mut Self { - self.type__shim(val); + self.set_type(val); self } } diff --git a/crates/web-sys/src/features/gen_XPathNsResolver.rs b/crates/web-sys/src/features/gen_XPathNsResolver.rs index 4601c9df1fc..d158b05ac1c 100644 --- a/crates/web-sys/src/features/gen_XPathNsResolver.rs +++ b/crates/web-sys/src/features/gen_XPathNsResolver.rs @@ -10,8 +10,16 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] pub type XPathNsResolver; + #[doc = "Get the `lookupNamespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] + #[wasm_bindgen(method, getter = "lookupNamespaceURI")] + pub fn get_lookup_namespace_uri(this: &XPathNsResolver) -> Option<::js_sys::Function>; + #[doc = "Change the `lookupNamespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] #[wasm_bindgen(method, setter = "lookupNamespaceURI")] - fn lookup_namespace_uri_shim(this: &XPathNsResolver, val: &::js_sys::Function); + pub fn set_lookup_namespace_uri(this: &XPathNsResolver, val: &::js_sys::Function); } impl XPathNsResolver { #[doc = "Construct a new `XPathNsResolver`."] @@ -22,11 +30,9 @@ impl XPathNsResolver { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[doc = "Change the `lookupNamespaceURI` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] + #[deprecated = "Use `set_lookup_namespace_uri()` instead."] pub fn lookup_namespace_uri(&mut self, val: &::js_sys::Function) -> &mut Self { - self.lookup_namespace_uri_shim(val); + self.set_lookup_namespace_uri(val); self } } diff --git a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs index 6f6712be78c..fc4d8fa2c01 100644 --- a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs @@ -14,18 +14,100 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourceEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrInputSourceEventInit, val: bool); + pub fn set_bubbles(this: &XrInputSourceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrInputSourceEventInit, val: bool); + pub fn set_cancelable(this: &XrInputSourceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &XrInputSourceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrInputSourceEventInit, val: bool); + pub fn set_composed(this: &XrInputSourceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrFrame")] + #[doc = "Get the `frame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "frame")] + pub fn get_frame(this: &XrInputSourceEventInit) -> XrFrame; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrFrame")] + #[doc = "Change the `frame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "frame")] - fn frame_shim(this: &XrInputSourceEventInit, val: &XrFrame); + pub fn set_frame(this: &XrInputSourceEventInit, val: &XrFrame); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrInputSource")] + #[doc = "Get the `inputSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "inputSource")] + pub fn get_input_source(this: &XrInputSourceEventInit) -> XrInputSource; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] + #[doc = "Change the `inputSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "inputSource")] - fn input_source_shim(this: &XrInputSourceEventInit, val: &XrInputSource); + pub fn set_input_source(this: &XrInputSourceEventInit, val: &XrInputSource); } #[cfg(web_sys_unstable_apis)] impl XrInputSourceEventInit { @@ -44,60 +126,35 @@ impl XrInputSourceEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrFrame")] - #[doc = "Change the `frame` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_frame()` instead."] pub fn frame(&mut self, val: &XrFrame) -> &mut Self { - self.frame_shim(val); + self.set_frame(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrInputSource")] - #[doc = "Change the `inputSource` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_input_source()` instead."] pub fn input_source(&mut self, val: &XrInputSource) -> &mut Self { - self.input_source_shim(val); + self.set_input_source(val); self } } diff --git a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs index 849c940a1ad..c2d2e32e4bb 100644 --- a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs @@ -14,19 +14,116 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourcesChangeEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_bubbles(this: &XrInputSourcesChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_cancelable(this: &XrInputSourcesChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &XrInputSourcesChangeEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrInputSourcesChangeEventInit, val: bool); + pub fn set_composed(this: &XrInputSourcesChangeEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `added` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "added")] + pub fn get_added(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `added` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "added")] - fn added_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_added(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `removed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "removed")] + pub fn get_removed(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `removed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "removed")] - fn removed_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + pub fn set_removed(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + #[doc = "Get the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "session")] + pub fn get_session(this: &XrInputSourcesChangeEventInit) -> XrSession; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] + #[doc = "Change the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "session")] - fn session_shim(this: &XrInputSourcesChangeEventInit, val: &XrSession); + pub fn set_session(this: &XrInputSourcesChangeEventInit, val: &XrSession); } #[cfg(web_sys_unstable_apis)] impl XrInputSourcesChangeEventInit { @@ -50,70 +147,40 @@ impl XrInputSourcesChangeEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `added` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_added()` instead."] pub fn added(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.added_shim(val); + self.set_added(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `removed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_removed()` instead."] pub fn removed(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.removed_shim(val); + self.set_removed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] - #[doc = "Change the `session` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_session()` instead."] pub fn session(&mut self, val: &XrSession) -> &mut Self { - self.session_shim(val); + self.set_session(val); self } } diff --git a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs index 51d4adbfe9e..6884a9b83db 100644 --- a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs @@ -14,16 +14,82 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &XrPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &XrPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &XrPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &XrPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &XrPermissionDescriptor, val: XrSessionMode); + pub fn set_mode(this: &XrPermissionDescriptor, val: XrSessionMode); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "optionalFeatures")] + pub fn get_optional_features(this: &XrPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalFeatures")] - fn optional_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_optional_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requiredFeatures")] + pub fn get_required_features(this: &XrPermissionDescriptor) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl XrPermissionDescriptor { @@ -42,48 +108,28 @@ impl XrPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_features()` instead."] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_features_shim(val); + self.set_optional_features(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features(val); self } } diff --git a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs index 4dbfb69ea22..8d36176b94b 100644 --- a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs @@ -14,18 +14,100 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrReferenceSpaceEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_bubbles(this: &XrReferenceSpaceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_cancelable(this: &XrReferenceSpaceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrReferenceSpaceEventInit, val: bool); + pub fn set_composed(this: &XrReferenceSpaceEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrReferenceSpace")] + #[doc = "Get the `referenceSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "referenceSpace")] + pub fn get_reference_space(this: &XrReferenceSpaceEventInit) -> XrReferenceSpace; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrReferenceSpace")] + #[doc = "Change the `referenceSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "referenceSpace")] - fn reference_space_shim(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); + pub fn set_reference_space(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrRigidTransform")] + #[doc = "Get the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "transform")] + pub fn get_transform(this: &XrReferenceSpaceEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrRigidTransform")] + #[doc = "Change the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "transform")] - fn transform_shim(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); + pub fn set_transform(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); } #[cfg(web_sys_unstable_apis)] impl XrReferenceSpaceEventInit { @@ -43,60 +125,35 @@ impl XrReferenceSpaceEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrReferenceSpace")] - #[doc = "Change the `referenceSpace` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_reference_space()` instead."] pub fn reference_space(&mut self, val: &XrReferenceSpace) -> &mut Self { - self.reference_space_shim(val); + self.set_reference_space(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrRigidTransform")] - #[doc = "Change the `transform` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_transform()` instead."] pub fn transform(&mut self, val: Option<&XrRigidTransform>) -> &mut Self { - self.transform_shim(val); + self.set_transform(val); self } } diff --git a/crates/web-sys/src/features/gen_XrRenderStateInit.rs b/crates/web-sys/src/features/gen_XrRenderStateInit.rs index 7b982dfa1dc..80c948a87c0 100644 --- a/crates/web-sys/src/features/gen_XrRenderStateInit.rs +++ b/crates/web-sys/src/features/gen_XrRenderStateInit.rs @@ -14,31 +14,16 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrRenderStateInit; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrWebGlLayer")] - #[wasm_bindgen(method, setter = "baseLayer")] - fn base_layer_shim(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); - #[wasm_bindgen(method, setter = "depthFar")] - fn depth_far_shim(this: &XrRenderStateInit, val: f64); - #[wasm_bindgen(method, setter = "depthNear")] - fn depth_near_shim(this: &XrRenderStateInit, val: f64); - #[wasm_bindgen(method, setter = "inlineVerticalFieldOfView")] - fn inline_vertical_field_of_view_shim(this: &XrRenderStateInit, val: f64); - #[wasm_bindgen(method, setter = "layers")] - fn layers_shim(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); -} -#[cfg(web_sys_unstable_apis)] -impl XrRenderStateInit { - #[doc = "Construct a new `XrRenderStateInit`."] + #[doc = "Get the `baseLayer` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`, `XrWebGlLayer`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "baseLayer")] + pub fn get_base_layer(this: &XrRenderStateInit) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrWebGlLayer")] #[doc = "Change the `baseLayer` field of this object."] @@ -47,10 +32,17 @@ impl XrRenderStateInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn base_layer(&mut self, val: Option<&XrWebGlLayer>) -> &mut Self { - self.base_layer_shim(val); - self - } + #[wasm_bindgen(method, setter = "baseLayer")] + pub fn set_base_layer(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthFar` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthFar")] + pub fn get_depth_far(this: &XrRenderStateInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthFar` field of this object."] #[doc = ""] @@ -58,10 +50,17 @@ impl XrRenderStateInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_far(&mut self, val: f64) -> &mut Self { - self.depth_far_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthFar")] + pub fn set_depth_far(this: &XrRenderStateInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthNear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depthNear")] + pub fn get_depth_near(this: &XrRenderStateInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depthNear` field of this object."] #[doc = ""] @@ -69,10 +68,17 @@ impl XrRenderStateInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth_near(&mut self, val: f64) -> &mut Self { - self.depth_near_shim(val); - self - } + #[wasm_bindgen(method, setter = "depthNear")] + pub fn set_depth_near(this: &XrRenderStateInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `inlineVerticalFieldOfView` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "inlineVerticalFieldOfView")] + pub fn get_inline_vertical_field_of_view(this: &XrRenderStateInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `inlineVerticalFieldOfView` field of this object."] #[doc = ""] @@ -80,10 +86,17 @@ impl XrRenderStateInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn inline_vertical_field_of_view(&mut self, val: f64) -> &mut Self { - self.inline_vertical_field_of_view_shim(val); - self - } + #[wasm_bindgen(method, setter = "inlineVerticalFieldOfView")] + pub fn set_inline_vertical_field_of_view(this: &XrRenderStateInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "layers")] + pub fn get_layers(this: &XrRenderStateInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `layers` field of this object."] #[doc = ""] @@ -91,8 +104,51 @@ impl XrRenderStateInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "layers")] + pub fn set_layers(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +impl XrRenderStateInit { + #[doc = "Construct a new `XrRenderStateInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrWebGlLayer")] + #[deprecated = "Use `set_base_layer()` instead."] + pub fn base_layer(&mut self, val: Option<&XrWebGlLayer>) -> &mut Self { + self.set_base_layer(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_far()` instead."] + pub fn depth_far(&mut self, val: f64) -> &mut Self { + self.set_depth_far(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth_near()` instead."] + pub fn depth_near(&mut self, val: f64) -> &mut Self { + self.set_depth_near(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_inline_vertical_field_of_view()` instead."] + pub fn inline_vertical_field_of_view(&mut self, val: f64) -> &mut Self { + self.set_inline_vertical_field_of_view(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_layers()` instead."] pub fn layers(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.layers_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_layers(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionEventInit.rs b/crates/web-sys/src/features/gen_XrSessionEventInit.rs index 56caaf616cf..39cea922779 100644 --- a/crates/web-sys/src/features/gen_XrSessionEventInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionEventInit.rs @@ -14,15 +14,80 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionEventInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "bubbles")] + pub fn get_bubbles(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrSessionEventInit, val: bool); + pub fn set_bubbles(this: &XrSessionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "cancelable")] + pub fn get_cancelable(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrSessionEventInit, val: bool); + pub fn set_cancelable(this: &XrSessionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "composed")] + pub fn get_composed(this: &XrSessionEventInit) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrSessionEventInit, val: bool); + pub fn set_composed(this: &XrSessionEventInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + #[doc = "Get the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "session")] + pub fn get_session(this: &XrSessionEventInit) -> XrSession; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] + #[doc = "Change the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "session")] - fn session_shim(this: &XrSessionEventInit, val: &XrSession); + pub fn set_session(this: &XrSessionEventInit, val: &XrSession); } #[cfg(web_sys_unstable_apis)] impl XrSessionEventInit { @@ -40,48 +105,28 @@ impl XrSessionEventInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `bubbles` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `cancelable` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `composed` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSession")] - #[doc = "Change the `session` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_session()` instead."] pub fn session(&mut self, val: &XrSession) -> &mut Self { - self.session_shim(val); + self.set_session(val); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionInit.rs b/crates/web-sys/src/features/gen_XrSessionInit.rs index 8bc078da63c..1e31e73dbee 100644 --- a/crates/web-sys/src/features/gen_XrSessionInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionInit.rs @@ -14,10 +14,42 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "optionalFeatures")] + pub fn get_optional_features(this: &XrSessionInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "optionalFeatures")] - fn optional_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + pub fn set_optional_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "requiredFeatures")] + pub fn get_required_features(this: &XrSessionInit) -> Option<::js_sys::Array>; + #[cfg(web_sys_unstable_apis)] + #[doc = "Change the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl XrSessionInit { @@ -33,25 +65,15 @@ impl XrSessionInit { ret } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `optionalFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_optional_features()` instead."] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_features_shim(val); + self.set_optional_features(val); self } #[cfg(web_sys_unstable_apis)] - #[doc = "Change the `requiredFeatures` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_required_features()` instead."] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features(val); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs index dc221e82d24..1c1f76d054f 100644 --- a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs @@ -14,12 +14,46 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionSupportedPermissionDescriptor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "name")] + pub fn get_name(this: &XrSessionSupportedPermissionDescriptor) -> PermissionName; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] + #[doc = "Change the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); + pub fn set_name(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "mode")] + pub fn get_mode(this: &XrSessionSupportedPermissionDescriptor) -> Option; + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] + #[doc = "Change the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); + pub fn set_mode(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); } #[cfg(web_sys_unstable_apis)] impl XrSessionSupportedPermissionDescriptor { @@ -38,26 +72,16 @@ impl XrSessionSupportedPermissionDescriptor { } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "PermissionName")] - #[doc = "Change the `name` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "XrSessionMode")] - #[doc = "Change the `mode` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] - #[doc = ""] - #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] - #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[deprecated = "Use `set_mode()` instead."] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode(val); self } } diff --git a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs index 9fe4ef7a073..9c813965d66 100644 --- a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs +++ b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs @@ -14,32 +14,15 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrWebGlLayerInit; - #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &XrWebGlLayerInit, val: bool); - #[wasm_bindgen(method, setter = "antialias")] - fn antialias_shim(this: &XrWebGlLayerInit, val: bool); - #[wasm_bindgen(method, setter = "depth")] - fn depth_shim(this: &XrWebGlLayerInit, val: bool); - #[wasm_bindgen(method, setter = "framebufferScaleFactor")] - fn framebuffer_scale_factor_shim(this: &XrWebGlLayerInit, val: f64); - #[wasm_bindgen(method, setter = "ignoreDepthValues")] - fn ignore_depth_values_shim(this: &XrWebGlLayerInit, val: bool); - #[wasm_bindgen(method, setter = "stencil")] - fn stencil_shim(this: &XrWebGlLayerInit, val: bool); -} -#[cfg(web_sys_unstable_apis)] -impl XrWebGlLayerInit { - #[doc = "Construct a new `XrWebGlLayerInit`."] + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alpha` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } + #[wasm_bindgen(method, getter = "alpha")] + pub fn get_alpha(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `alpha` field of this object."] #[doc = ""] @@ -47,10 +30,17 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); - self - } + #[wasm_bindgen(method, setter = "alpha")] + pub fn set_alpha(this: &XrWebGlLayerInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "antialias")] + pub fn get_antialias(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `antialias` field of this object."] #[doc = ""] @@ -58,10 +48,17 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn antialias(&mut self, val: bool) -> &mut Self { - self.antialias_shim(val); - self - } + #[wasm_bindgen(method, setter = "antialias")] + pub fn set_antialias(this: &XrWebGlLayerInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "depth")] + pub fn get_depth(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `depth` field of this object."] #[doc = ""] @@ -69,10 +66,17 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn depth(&mut self, val: bool) -> &mut Self { - self.depth_shim(val); - self - } + #[wasm_bindgen(method, setter = "depth")] + pub fn set_depth(this: &XrWebGlLayerInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `framebufferScaleFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "framebufferScaleFactor")] + pub fn get_framebuffer_scale_factor(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `framebufferScaleFactor` field of this object."] #[doc = ""] @@ -80,10 +84,17 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn framebuffer_scale_factor(&mut self, val: f64) -> &mut Self { - self.framebuffer_scale_factor_shim(val); - self - } + #[wasm_bindgen(method, setter = "framebufferScaleFactor")] + pub fn set_framebuffer_scale_factor(this: &XrWebGlLayerInit, val: f64); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ignoreDepthValues` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "ignoreDepthValues")] + pub fn get_ignore_depth_values(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `ignoreDepthValues` field of this object."] #[doc = ""] @@ -91,10 +102,17 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn ignore_depth_values(&mut self, val: bool) -> &mut Self { - self.ignore_depth_values_shim(val); - self - } + #[wasm_bindgen(method, setter = "ignoreDepthValues")] + pub fn set_ignore_depth_values(this: &XrWebGlLayerInit, val: bool); + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, getter = "stencil")] + pub fn get_stencil(this: &XrWebGlLayerInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `stencil` field of this object."] #[doc = ""] @@ -102,8 +120,56 @@ impl XrWebGlLayerInit { #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + #[wasm_bindgen(method, setter = "stencil")] + pub fn set_stencil(this: &XrWebGlLayerInit, val: bool); +} +#[cfg(web_sys_unstable_apis)] +impl XrWebGlLayerInit { + #[doc = "Construct a new `XrWebGlLayerInit`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_alpha()` instead."] + pub fn alpha(&mut self, val: bool) -> &mut Self { + self.set_alpha(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_antialias()` instead."] + pub fn antialias(&mut self, val: bool) -> &mut Self { + self.set_antialias(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_depth()` instead."] + pub fn depth(&mut self, val: bool) -> &mut Self { + self.set_depth(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_framebuffer_scale_factor()` instead."] + pub fn framebuffer_scale_factor(&mut self, val: f64) -> &mut Self { + self.set_framebuffer_scale_factor(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_ignore_depth_values()` instead."] + pub fn ignore_depth_values(&mut self, val: bool) -> &mut Self { + self.set_ignore_depth_values(val); + self + } + #[cfg(web_sys_unstable_apis)] + #[deprecated = "Use `set_stencil()` instead."] pub fn stencil(&mut self, val: bool) -> &mut Self { - self.stencil_shim(val); + self.set_stencil(val); self } } diff --git a/crates/webidl/src/generator.rs b/crates/webidl/src/generator.rs index f65d5759318..33ffd094f65 100644 --- a/crates/webidl/src/generator.rs +++ b/crates/webidl/src/generator.rs @@ -630,9 +630,10 @@ impl Interface { } pub struct DictionaryField { - pub name: Ident, + pub name: String, pub js_name: String, pub ty: Type, + pub return_ty: Type, pub is_js_value_ref_option_type: bool, pub required: bool, pub unstable: bool, @@ -642,10 +643,14 @@ impl DictionaryField { fn generate_rust_shim( &self, parent_ident: &Ident, + options: &Options, + features: &BTreeSet, cfg_features: &Option, ) -> TokenStream { let ty = &self.ty; - let shim_name = self.shim_name(); + let return_ty = &self.return_ty; + let getter_name = format_ident!("get_{}", self.name); + let setter_name = self.setter_name(); let js_name = &self.js_name; let js_value_ref_type = shared_ref( @@ -659,37 +664,52 @@ impl DictionaryField { ty.clone() }; + let unstable_attr = maybe_unstable_attr(self.unstable); + let unstable_docs = maybe_unstable_docs(self.unstable); + + let getter_doc_comment = comment( + format!("Get the `{}` field of this object.", js_name), + &required_doc_string(options, features), + ); + + let setter_doc_comment = comment( + format!("Change the `{}` field of this object.", js_name), + &required_doc_string(options, features), + ); + quote! { + #unstable_attr #cfg_features + #getter_doc_comment + #unstable_docs + #[wasm_bindgen(method, getter = #js_name)] + pub fn #getter_name(this: &#parent_ident) -> #return_ty; + + #unstable_attr + #cfg_features + #setter_doc_comment + #unstable_docs #[wasm_bindgen(method, setter = #js_name)] - fn #shim_name(this: &#parent_ident, val: #ty); + pub fn #setter_name(this: &#parent_ident, val: #ty); } } - fn generate_rust_setter( - &self, - options: &Options, - features: &BTreeSet, - cfg_features: &Option, - ) -> TokenStream { + fn generate_rust_setter(&self, cfg_features: &Option) -> TokenStream { let DictionaryField { name, - js_name, + js_name: _, ty, + return_ty: _, is_js_value_ref_option_type: _, required: _, unstable, } = self; + let name = rust_ident(name); let unstable_attr = maybe_unstable_attr(*unstable); - let unstable_docs = maybe_unstable_docs(*unstable); - - let doc_comment = comment( - format!("Change the `{}` field of this object.", js_name), - &required_doc_string(options, features), - ); - let shim_name = self.shim_name(); + let setter_name = self.setter_name(); + let deprecated = format!("Use `{}()` instead.", setter_name); let shim_args = if self.is_js_value_ref_option_type { quote! { val.unwrap_or(&::wasm_bindgen::JsValue::NULL) } @@ -700,10 +720,9 @@ impl DictionaryField { quote! { #unstable_attr #cfg_features - #doc_comment - #unstable_docs + #[deprecated = #deprecated] pub fn #name(&mut self, val: #ty) -> &mut Self { - self.#shim_name(#shim_args); + self.#setter_name(#shim_args); self } } @@ -727,8 +746,8 @@ impl DictionaryField { (features, cfg_features) } - fn shim_name(&self) -> Ident { - format_ident!("{}_shim", self.name) + fn setter_name(&self) -> Ident { + format_ident!("set_{}", self.name) } } @@ -759,7 +778,7 @@ impl Dictionary { for field in fields.iter() { if field.required { - let name = &field.name; + let name = rust_ident(&field.name); let ty = &field.ty; required_args.push(quote!( #name: #ty )); required_calls.push(quote!( ret.#name(#name); )); @@ -789,17 +808,17 @@ impl Dictionary { let field_shims = fields .iter() + .zip(field_features.iter()) .zip(field_cfg_features.iter()) - .map(|(field, cfg_features)| field.generate_rust_shim(name, cfg_features)) + .map(|((field, features), cfg_features)| { + field.generate_rust_shim(name, options, features, cfg_features) + }) .collect::>(); let fields = fields .iter() - .zip(field_features.iter()) .zip(field_cfg_features.iter()) - .map(|((field, features), cfg_features)| { - field.generate_rust_setter(options, features, cfg_features) - }) + .map(|(field, cfg_features)| field.generate_rust_setter(cfg_features)) .collect::>(); let mut base_stream = quote! { diff --git a/crates/webidl/src/lib.rs b/crates/webidl/src/lib.rs index f011fe98006..2f921d46082 100644 --- a/crates/webidl/src/lib.rs +++ b/crates/webidl/src/lib.rs @@ -25,9 +25,9 @@ use crate::generator::{ use crate::idl_type::ToIdlType; use crate::traverse::TraverseType; use crate::util::{ - camel_case_ident, getter_throws, is_structural, is_type_unstable, read_dir, setter_throws, - shouty_snake_case_ident, snake_case_ident, throws, webidl_const_v_to_backend_const_v, - TypePosition, + camel_case_ident, getter_throws, is_structural, is_type_unstable, optional_return_ty, read_dir, + setter_throws, shouty_snake_case_ident, snake_case_ident, throws, + webidl_const_v_to_backend_const_v, TypePosition, }; use anyhow::Context; use anyhow::Result; @@ -397,6 +397,12 @@ impl<'src> FirstPassRecord<'src> { .to_syn_type(TypePosition::Argument) .unwrap_or(None)?; + let mut return_ty = idl_type.to_syn_type(TypePosition::Return).unwrap().unwrap(); + + if field.required.is_none() { + return_ty = optional_return_ty(return_ty); + } + // Slice types aren't supported because they don't implement // `Into` match ty { @@ -435,9 +441,10 @@ impl<'src> FirstPassRecord<'src> { Some(DictionaryField { required: field.required.is_some(), - name: rust_ident(&snake_case_ident(field.identifier.0)), + name: snake_case_ident(field.identifier.0), js_name: field.identifier.0.to_string(), ty, + return_ty, is_js_value_ref_option_type, unstable: unstable_override, }) @@ -779,12 +786,18 @@ impl<'src> FirstPassRecord<'src> { fields.push(DictionaryField { required: false, - name: rust_ident(&snake_case_ident(identifier)), + name: snake_case_ident(identifier), js_name: identifier.to_string(), ty: idl_type::IdlType::Callback .to_syn_type(pos) .unwrap() .unwrap(), + return_ty: optional_return_ty( + idl_type::IdlType::Callback + .to_syn_type(TypePosition::Return) + .unwrap() + .unwrap(), + ), is_js_value_ref_option_type: false, unstable: false, }) diff --git a/crates/webidl/src/util.rs b/crates/webidl/src/util.rs index 0f663978fd3..3f1c6ccc638 100644 --- a/crates/webidl/src/util.rs +++ b/crates/webidl/src/util.rs @@ -81,6 +81,25 @@ pub fn snake_case_ident(identifier: &str) -> String { fix_ident(identifier).to_snake_case() } +/// Wrap [`TypePosition::Return`] type into an `Option` if not already and if not a `JsValue`. +pub fn optional_return_ty(ty: syn::Type) -> syn::Type { + if let syn::Type::Path(path) = &ty { + if let Some(segment) = path.path.segments.first() { + if segment.ident == "Option" { + return ty; + } else if path.path.leading_colon.is_some() && segment.ident == "wasm_bindgen" { + if let Some(segment) = path.path.segments.iter().nth(1) { + if segment.ident == "JsValue" { + return ty; + } + } + } + } + } + + option_ty(ty) +} + // Returns a link to MDN pub fn mdn_doc(class: &str, method: Option<&str>) -> String { let mut link = format!("https://developer.mozilla.org/en-US/docs/Web/API/{}", class); diff --git a/examples/fetch/src/lib.rs b/examples/fetch/src/lib.rs index 95af06e4c28..47e7c0f33fd 100644 --- a/examples/fetch/src/lib.rs +++ b/examples/fetch/src/lib.rs @@ -4,9 +4,9 @@ use web_sys::{Request, RequestInit, RequestMode, Response}; #[wasm_bindgen] pub async fn run(repo: String) -> Result { - let mut opts = RequestInit::new(); - opts.method("GET"); - opts.mode(RequestMode::Cors); + let opts = RequestInit::new(); + opts.set_method("GET"); + opts.set_mode(RequestMode::Cors); let url = format!("https://api.github.com/repos/{}/branches/master", repo); diff --git a/examples/wasm-audio-worklet/src/dependent_module.rs b/examples/wasm-audio-worklet/src/dependent_module.rs index 6b01eb175ab..ce7f038fdcd 100644 --- a/examples/wasm-audio-worklet/src/dependent_module.rs +++ b/examples/wasm-audio-worklet/src/dependent_module.rs @@ -23,9 +23,11 @@ pub fn on_the_fly(code: &str) -> Result { IMPORT_META.url(), ); + let options = BlobPropertyBag::new(); + options.set_type("text/javascript"); Url::create_object_url_with_blob(&Blob::new_with_str_sequence_and_options( &Array::of2(&JsValue::from(header.as_str()), &JsValue::from(code)), - BlobPropertyBag::new().type_("text/javascript"), + &options, )?) } diff --git a/examples/wasm-audio-worklet/src/wasm_audio.rs b/examples/wasm-audio-worklet/src/wasm_audio.rs index decaebd60d5..5b0534d99b2 100644 --- a/examples/wasm-audio-worklet/src/wasm_audio.rs +++ b/examples/wasm-audio-worklet/src/wasm_audio.rs @@ -41,15 +41,13 @@ pub fn wasm_audio_node( ctx: &AudioContext, process: Box bool>, ) -> Result { - AudioWorkletNode::new_with_options( - ctx, - "WasmProcessor", - AudioWorkletNodeOptions::new().processor_options(Some(&js_sys::Array::of3( - &wasm_bindgen::module(), - &wasm_bindgen::memory(), - &WasmAudioProcessor(process).pack().into(), - ))), - ) + let options = AudioWorkletNodeOptions::new(); + options.set_processor_options(Some(&js_sys::Array::of3( + &wasm_bindgen::module(), + &wasm_bindgen::memory(), + &WasmAudioProcessor(process).pack().into(), + ))); + AudioWorkletNode::new_with_options(ctx, "WasmProcessor", &options) } pub async fn prepare_wasm_audio(ctx: &AudioContext) -> Result<(), JsValue> { diff --git a/examples/webrtc_datachannel/src/lib.rs b/examples/webrtc_datachannel/src/lib.rs index 7bb52f0a0e3..8a94fb62d45 100644 --- a/examples/webrtc_datachannel/src/lib.rs +++ b/examples/webrtc_datachannel/src/lib.rs @@ -113,8 +113,8 @@ async fn start() -> Result<(), JsValue> { .unwrap(); console_log!("pc1: offer {:?}", offer_sdp); - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); + let offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); + offer_obj.set_sdp(&offer_sdp); let sld_promise = pc1.set_local_description(&offer_obj); JsFuture::from(sld_promise).await?; console_log!("pc1: state {:?}", pc1.signaling_state()); @@ -124,8 +124,8 @@ async fn start() -> Result<(), JsValue> { * Create and send ANSWER from pc2 to pc1 * */ - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); + let offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); + offer_obj.set_sdp(&offer_sdp); let srd_promise = pc2.set_remote_description(&offer_obj); JsFuture::from(srd_promise).await?; console_log!("pc2: state {:?}", pc2.signaling_state()); @@ -136,8 +136,8 @@ async fn start() -> Result<(), JsValue> { .unwrap(); console_log!("pc2: answer {:?}", answer_sdp); - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - answer_obj.sdp(&answer_sdp); + let answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); + answer_obj.set_sdp(&answer_sdp); let sld_promise = pc2.set_local_description(&answer_obj); JsFuture::from(sld_promise).await?; console_log!("pc2: state {:?}", pc2.signaling_state()); @@ -146,8 +146,8 @@ async fn start() -> Result<(), JsValue> { * Receive ANSWER from pc2 * */ - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - answer_obj.sdp(&answer_sdp); + let answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); + answer_obj.set_sdp(&answer_sdp); let srd_promise = pc1.set_remote_description(&answer_obj); JsFuture::from(srd_promise).await?; console_log!("pc1: state {:?}", pc1.signaling_state());