Don't use reflect in webidl dictionary setters (#3898)

This commit is contained in:
David Huculak
2024-04-03 02:33:51 -04:00
committed by GitHub
parent 9347af3b51
commit d25a68eaa7
545 changed files with 8000 additions and 24107 deletions

View File

@@ -19,6 +19,9 @@
* Stabilize Web Share API.
[#3882](https://github.com/rustwasm/wasm-bindgen/pull/3882)
* Generate JS bindings for WebIDL dictionary setters instead of using `Reflect`. This increases the size of the Web API bindings but should be more performant. Also, importing getters/setters from JS now supports specifying the JS attribute name as a string, e.g. `#[wasm_bindgen(method, setter = "x-cdm-codecs")]`.
[#3898](https://github.com/rustwasm/wasm-bindgen/pull/3898)
### Fixed
* Copy port from headless test server when using `WASM_BINDGEN_TEST_ADDRESS`.

View File

@@ -242,10 +242,10 @@ pub struct Operation {
pub enum OperationKind {
/// A standard method, nothing special
Regular,
/// A method for getting the value of the provided Ident
Getter(Option<Ident>),
/// A method for setting the value of the provided Ident
Setter(Option<Ident>),
/// A method for getting the value of the provided Ident or String
Getter(Option<String>),
/// A method for setting the value of the provided Ident or String
Setter(Option<String>),
/// A dynamically intercepted getter
IndexingGetter,
/// A dynamically intercepted setter

View File

@@ -531,12 +531,12 @@ fn from_ast_method_kind<'a>(
let is_static = *is_static;
let kind = match kind {
ast::OperationKind::Getter(g) => {
let g = g.as_ref().map(|g| intern.intern(g));
let g = g.as_ref().map(|g| intern.intern_str(g));
OperationKind::Getter(g.unwrap_or_else(|| function.infer_getter_property()))
}
ast::OperationKind::Regular => OperationKind::Regular,
ast::OperationKind::Setter(s) => {
let s = s.as_ref().map(|s| intern.intern(s));
let s = s.as_ref().map(|s| intern.intern_str(s));
OperationKind::Setter(match s {
Some(s) => s,
None => intern.intern_str(&function.infer_setter_property()?),

View File

@@ -65,8 +65,8 @@ macro_rules! attrgen {
(module, Module(Span, String, Span)),
(raw_module, RawModule(Span, String, Span)),
(inline_js, InlineJs(Span, String, Span)),
(getter, Getter(Span, Option<Ident>)),
(setter, Setter(Span, Option<Ident>)),
(getter, Getter(Span, Option<String>)),
(setter, Setter(Span, Option<String>)),
(indexing_getter, IndexingGetter(Span)),
(indexing_setter, IndexingSetter(Span)),
(indexing_deleter, IndexingDeleter(Span)),
@@ -299,10 +299,15 @@ impl Parse for BindgenAttr {
return Ok(BindgenAttr::$variant(attr_span, ident))
});
(@parser $variant:ident(Span, Option<Ident>)) => ({
(@parser $variant:ident(Span, Option<String>)) => ({
if input.parse::<Token![=]>().is_ok() {
if input.peek(syn::LitStr) {
let litstr = input.parse::<syn::LitStr>()?;
return Ok(BindgenAttr::$variant(attr_span, Some(litstr.value())))
}
let ident = input.parse::<AnyIdent>()?.0;
return Ok(BindgenAttr::$variant(attr_span, Some(ident)))
return Ok(BindgenAttr::$variant(attr_span, Some(ident.to_string())))
} else {
return Ok(BindgenAttr::$variant(attr_span, None));
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub type AddEventListenerOptions;
#[wasm_bindgen(method, setter = "capture")]
fn capture_shim(this: &AddEventListenerOptions, val: bool);
#[wasm_bindgen(method, setter = "once")]
fn once_shim(this: &AddEventListenerOptions, val: bool);
#[wasm_bindgen(method, setter = "passive")]
fn passive_shim(this: &AddEventListenerOptions, val: bool);
}
impl AddEventListenerOptions {
#[doc = "Construct a new `AddEventListenerOptions`."]
@@ -24,47 +30,21 @@ impl AddEventListenerOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub fn capture(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("capture"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.capture_shim(val);
self
}
#[doc = "Change the `once` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub fn once(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("once"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.once_shim(val);
self
}
#[doc = "Change the `passive` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub fn passive(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("passive"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.passive_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
pub type AesCbcParams;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesCbcParams, val: &str);
#[wasm_bindgen(method, setter = "iv")]
fn iv_shim(this: &AesCbcParams, val: &::js_sys::Object);
}
impl AesCbcParams {
#[doc = "Construct a new `AesCbcParams`."]
@@ -26,26 +30,14 @@ impl AesCbcParams {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `iv` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("iv"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.iv_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub type AesCtrParams;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesCtrParams, val: &str);
#[wasm_bindgen(method, setter = "counter")]
fn counter_shim(this: &AesCtrParams, val: &::js_sys::Object);
#[wasm_bindgen(method, setter = "length")]
fn length_shim(this: &AesCtrParams, val: u8);
}
impl AesCtrParams {
#[doc = "Construct a new `AesCtrParams`."]
@@ -27,44 +33,21 @@ impl AesCtrParams {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `counter` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub fn counter(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("counter"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.counter_shim(val);
self
}
#[doc = "Change the `length` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub fn length(&mut self, val: u8) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.length_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
pub type AesDerivedKeyParams;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesDerivedKeyParams, val: &str);
#[wasm_bindgen(method, setter = "length")]
fn length_shim(this: &AesDerivedKeyParams, val: u32);
}
impl AesDerivedKeyParams {
#[doc = "Construct a new `AesDerivedKeyParams`."]
@@ -26,27 +30,14 @@ impl AesDerivedKeyParams {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `length` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
pub fn length(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.length_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub type AesGcmParams;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesGcmParams, val: &str);
#[wasm_bindgen(method, setter = "additionalData")]
fn additional_data_shim(this: &AesGcmParams, val: &::js_sys::Object);
#[wasm_bindgen(method, setter = "iv")]
fn iv_shim(this: &AesGcmParams, val: &::js_sys::Object);
#[wasm_bindgen(method, setter = "tagLength")]
fn tag_length_shim(this: &AesGcmParams, val: u8);
}
impl AesGcmParams {
#[doc = "Construct a new `AesGcmParams`."]
@@ -26,60 +34,28 @@ impl AesGcmParams {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `additionalData` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub fn additional_data(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("additionalData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.additional_data_shim(val);
self
}
#[doc = "Change the `iv` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("iv"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.iv_shim(val);
self
}
#[doc = "Change the `tagLength` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub fn tag_length(&mut self, val: u8) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("tagLength"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.tag_length_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
pub type AesKeyAlgorithm;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesKeyAlgorithm, val: &str);
#[wasm_bindgen(method, setter = "length")]
fn length_shim(this: &AesKeyAlgorithm, val: u16);
}
impl AesKeyAlgorithm {
#[doc = "Construct a new `AesKeyAlgorithm`."]
@@ -26,27 +30,14 @@ impl AesKeyAlgorithm {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `length` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
pub fn length(&mut self, val: u16) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.length_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
pub type AesKeyGenParams;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AesKeyGenParams, val: &str);
#[wasm_bindgen(method, setter = "length")]
fn length_shim(this: &AesKeyGenParams, val: u16);
}
impl AesKeyGenParams {
#[doc = "Construct a new `AesKeyGenParams`."]
@@ -26,27 +30,14 @@ impl AesKeyGenParams {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `length` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
pub fn length(&mut self, val: u16) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.length_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"]
pub type Algorithm;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &Algorithm, val: &str);
}
impl Algorithm {
#[doc = "Construct a new `Algorithm`."]
@@ -25,13 +27,7 @@ impl Algorithm {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
}

View File

@@ -14,6 +14,12 @@ 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;
#[wasm_bindgen(method, setter = "allowedServices")]
fn allowed_services_shim(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "deviceId")]
fn device_id_shim(this: &AllowedBluetoothDevice, val: &str);
#[wasm_bindgen(method, setter = "mayUseGATT")]
fn may_use_gatt_shim(this: &AllowedBluetoothDevice, val: bool);
}
#[cfg(web_sys_unstable_apis)]
impl AllowedBluetoothDevice {
@@ -43,17 +49,7 @@ impl AllowedBluetoothDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn allowed_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("allowedServices"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.allowed_services_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -64,17 +60,7 @@ impl AllowedBluetoothDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("deviceId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.device_id_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -85,17 +71,7 @@ impl AllowedBluetoothDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn may_use_gatt(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("mayUseGATT"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.may_use_gatt_shim(val);
self
}
}

View File

@@ -14,6 +14,12 @@ 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;
#[wasm_bindgen(method, setter = "productId")]
fn product_id_shim(this: &AllowedUsbDevice, val: u8);
#[wasm_bindgen(method, setter = "serialNumber")]
fn serial_number_shim(this: &AllowedUsbDevice, val: &str);
#[wasm_bindgen(method, setter = "vendorId")]
fn vendor_id_shim(this: &AllowedUsbDevice, val: u8);
}
#[cfg(web_sys_unstable_apis)]
impl AllowedUsbDevice {
@@ -38,17 +44,7 @@ impl AllowedUsbDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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: u8) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("productId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.product_id_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -59,17 +55,7 @@ impl AllowedUsbDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("serialNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.serial_number_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -80,17 +66,7 @@ impl AllowedUsbDevice {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn vendor_id(&mut self, val: u8) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("vendorId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.vendor_id_shim(val);
self
}
}

View File

@@ -10,6 +10,22 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub type AnalyserOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &AnalyserOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &AnalyserOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &AnalyserOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "fftSize")]
fn fft_size_shim(this: &AnalyserOptions, val: u32);
#[wasm_bindgen(method, setter = "maxDecibels")]
fn max_decibels_shim(this: &AnalyserOptions, val: f64);
#[wasm_bindgen(method, setter = "minDecibels")]
fn min_decibels_shim(this: &AnalyserOptions, val: f64);
#[wasm_bindgen(method, setter = "smoothingTimeConstant")]
fn smoothing_time_constant_shim(this: &AnalyserOptions, val: f64);
}
impl AnalyserOptions {
#[doc = "Construct a new `AnalyserOptions`."]
@@ -24,17 +40,7 @@ impl AnalyserOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +48,7 @@ impl AnalyserOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,85 +56,35 @@ impl AnalyserOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `fftSize` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn fft_size(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("fftSize"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.fft_size_shim(val);
self
}
#[doc = "Change the `maxDecibels` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn max_decibels(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("maxDecibels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_decibels_shim(val);
self
}
#[doc = "Change the `minDecibels` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn min_decibels(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("minDecibels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.min_decibels_shim(val);
self
}
#[doc = "Change the `smoothingTimeConstant` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn smoothing_time_constant(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("smoothingTimeConstant"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.smoothing_time_constant_shim(val);
self
}
}

View File

@@ -10,6 +10,18 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub type AnimationEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &AnimationEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &AnimationEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &AnimationEventInit, val: bool);
#[wasm_bindgen(method, setter = "animationName")]
fn animation_name_shim(this: &AnimationEventInit, val: &str);
#[wasm_bindgen(method, setter = "elapsedTime")]
fn elapsed_time_shim(this: &AnimationEventInit, val: f32);
#[wasm_bindgen(method, setter = "pseudoElement")]
fn pseudo_element_shim(this: &AnimationEventInit, val: &str);
}
impl AnimationEventInit {
#[doc = "Construct a new `AnimationEventInit`."]
@@ -24,102 +36,42 @@ impl AnimationEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `animationName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn animation_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("animationName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.animation_name_shim(val);
self
}
#[doc = "Change the `elapsedTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn elapsed_time(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("elapsedTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.elapsed_time_shim(val);
self
}
#[doc = "Change the `pseudoElement` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn pseudo_element(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("pseudoElement"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.pseudo_element_shim(val);
self
}
}

View File

@@ -10,6 +10,16 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub type AnimationPlaybackEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &AnimationPlaybackEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &AnimationPlaybackEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &AnimationPlaybackEventInit, val: bool);
#[wasm_bindgen(method, setter = "currentTime")]
fn current_time_shim(this: &AnimationPlaybackEventInit, val: Option<f64>);
#[wasm_bindgen(method, setter = "timelineTime")]
fn timeline_time_shim(this: &AnimationPlaybackEventInit, val: Option<f64>);
}
impl AnimationPlaybackEventInit {
#[doc = "Construct a new `AnimationPlaybackEventInit`."]
@@ -24,85 +34,35 @@ impl AnimationPlaybackEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `currentTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn current_time(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("currentTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.current_time_shim(val);
self
}
#[doc = "Change the `timelineTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn timeline_time(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("timelineTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.timeline_time_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub type AnimationPropertyDetails;
#[wasm_bindgen(method, setter = "property")]
fn property_shim(this: &AnimationPropertyDetails, val: &str);
#[wasm_bindgen(method, setter = "runningOnCompositor")]
fn running_on_compositor_shim(this: &AnimationPropertyDetails, val: bool);
#[wasm_bindgen(method, setter = "values")]
fn values_shim(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "warning")]
fn warning_shim(this: &AnimationPropertyDetails, val: &str);
}
impl AnimationPropertyDetails {
#[doc = "Construct a new `AnimationPropertyDetails`."]
@@ -31,65 +39,28 @@ impl AnimationPropertyDetails {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub fn property(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("property"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.property_shim(val);
self
}
#[doc = "Change the `runningOnCompositor` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub fn running_on_compositor(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("runningOnCompositor"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.running_on_compositor_shim(val);
self
}
#[doc = "Change the `values` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub fn values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("values"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.values_shim(val);
self
}
#[doc = "Change the `warning` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub fn warning(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("warning"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.warning_shim(val);
self
}
}

View File

@@ -10,6 +10,15 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
pub type AnimationPropertyValueDetails;
#[cfg(feature = "CompositeOperation")]
#[wasm_bindgen(method, setter = "composite")]
fn composite_shim(this: &AnimationPropertyValueDetails, val: CompositeOperation);
#[wasm_bindgen(method, setter = "easing")]
fn easing_shim(this: &AnimationPropertyValueDetails, val: &str);
#[wasm_bindgen(method, setter = "offset")]
fn offset_shim(this: &AnimationPropertyValueDetails, val: f64);
#[wasm_bindgen(method, setter = "value")]
fn value_shim(this: &AnimationPropertyValueDetails, val: &str);
}
impl AnimationPropertyValueDetails {
#[cfg(feature = "CompositeOperation")]
@@ -28,58 +37,28 @@ impl AnimationPropertyValueDetails {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composite"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composite_shim(val);
self
}
#[doc = "Change the `easing` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
pub fn easing(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.easing_shim(val);
self
}
#[doc = "Change the `offset` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
pub fn offset(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.offset_shim(val);
self
}
#[doc = "Change the `value` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
pub fn value(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.value_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"]
pub type AssignedNodesOptions;
#[wasm_bindgen(method, setter = "flatten")]
fn flatten_shim(this: &AssignedNodesOptions, val: bool);
}
impl AssignedNodesOptions {
#[doc = "Construct a new `AssignedNodesOptions`."]
@@ -24,17 +26,7 @@ impl AssignedNodesOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"]
pub fn flatten(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("flatten"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.flatten_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
pub type AttributeNameValue;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &AttributeNameValue, val: &str);
#[wasm_bindgen(method, setter = "value")]
fn value_shim(this: &AttributeNameValue, val: &str);
}
impl AttributeNameValue {
#[doc = "Construct a new `AttributeNameValue`."]
@@ -26,26 +30,14 @@ impl AttributeNameValue {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[doc = "Change the `value` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
pub fn value(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.value_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub type AudioBufferOptions;
#[wasm_bindgen(method, setter = "length")]
fn length_shim(this: &AudioBufferOptions, val: u32);
#[wasm_bindgen(method, setter = "numberOfChannels")]
fn number_of_channels_shim(this: &AudioBufferOptions, val: u32);
#[wasm_bindgen(method, setter = "sampleRate")]
fn sample_rate_shim(this: &AudioBufferOptions, val: f32);
}
impl AudioBufferOptions {
#[doc = "Construct a new `AudioBufferOptions`."]
@@ -26,48 +32,21 @@ impl AudioBufferOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub fn length(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.length_shim(val);
self
}
#[doc = "Change the `numberOfChannels` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub fn number_of_channels(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfChannels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_channels_shim(val);
self
}
#[doc = "Change the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub fn sample_rate(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sampleRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sample_rate_shim(val);
self
}
}

View File

@@ -10,6 +10,19 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub type AudioBufferSourceOptions;
#[cfg(feature = "AudioBuffer")]
#[wasm_bindgen(method, setter = "buffer")]
fn buffer_shim(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>);
#[wasm_bindgen(method, setter = "detune")]
fn detune_shim(this: &AudioBufferSourceOptions, val: f32);
#[wasm_bindgen(method, setter = "loop")]
fn loop__shim(this: &AudioBufferSourceOptions, val: bool);
#[wasm_bindgen(method, setter = "loopEnd")]
fn loop_end_shim(this: &AudioBufferSourceOptions, val: f64);
#[wasm_bindgen(method, setter = "loopStart")]
fn loop_start_shim(this: &AudioBufferSourceOptions, val: f64);
#[wasm_bindgen(method, setter = "playbackRate")]
fn playback_rate_shim(this: &AudioBufferSourceOptions, val: f32);
}
impl AudioBufferSourceOptions {
#[doc = "Construct a new `AudioBufferSourceOptions`."]
@@ -25,92 +38,42 @@ impl AudioBufferSourceOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"]
pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("buffer"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.buffer_shim(val);
self
}
#[doc = "Change the `detune` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn detune(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("detune"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.detune_shim(val);
self
}
#[doc = "Change the `loop` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn loop_(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("loop"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.loop__shim(val);
self
}
#[doc = "Change the `loopEnd` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn loop_end(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("loopEnd"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.loop_end_shim(val);
self
}
#[doc = "Change the `loopStart` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn loop_start(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("loopStart"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.loop_start_shim(val);
self
}
#[doc = "Change the `playbackRate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn playback_rate(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("playbackRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.playback_rate_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub type AudioConfiguration;
#[wasm_bindgen(method, setter = "bitrate")]
fn bitrate_shim(this: &AudioConfiguration, val: f64);
#[wasm_bindgen(method, setter = "channels")]
fn channels_shim(this: &AudioConfiguration, val: &str);
#[wasm_bindgen(method, setter = "contentType")]
fn content_type_shim(this: &AudioConfiguration, val: &str);
#[wasm_bindgen(method, setter = "samplerate")]
fn samplerate_shim(this: &AudioConfiguration, val: u32);
}
impl AudioConfiguration {
#[doc = "Construct a new `AudioConfiguration`."]
@@ -24,68 +32,28 @@ impl AudioConfiguration {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub fn bitrate(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bitrate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bitrate_shim(val);
self
}
#[doc = "Change the `channels` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub fn channels(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channels_shim(val);
self
}
#[doc = "Change the `contentType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub fn content_type(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("contentType"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.content_type_shim(val);
self
}
#[doc = "Change the `samplerate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub fn samplerate(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("samplerate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.samplerate_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"]
pub type AudioContextOptions;
#[wasm_bindgen(method, setter = "latencyHint")]
fn latency_hint_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "sampleRate")]
fn sample_rate_shim(this: &AudioContextOptions, val: f32);
#[wasm_bindgen(method, setter = "sinkId")]
fn sink_id_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue);
}
impl AudioContextOptions {
#[doc = "Construct a new `AudioContextOptions`."]
@@ -24,34 +30,14 @@ impl AudioContextOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"]
pub fn latency_hint(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("latencyHint"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.latency_hint_shim(val);
self
}
#[doc = "Change the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"]
pub fn sample_rate(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sampleRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sample_rate_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -62,14 +48,7 @@ impl AudioContextOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn sink_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("sinkId"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sink_id_shim(val);
self
}
}

View File

@@ -14,6 +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 AudioDataCopyToOptions;
#[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 {
@@ -38,14 +47,7 @@ impl AudioDataCopyToOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("format"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.format_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -56,17 +58,7 @@ impl AudioDataCopyToOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("frameCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.frame_count_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -77,17 +69,7 @@ impl AudioDataCopyToOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("frameOffset"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.frame_offset_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -98,17 +80,7 @@ impl AudioDataCopyToOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn plane_index(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("planeIndex"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.plane_index_shim(val);
self
}
}

View File

@@ -14,6 +14,19 @@ 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;
#[wasm_bindgen(method, setter = "data")]
fn data_shim(this: &AudioDataInit, val: &::js_sys::Object);
#[cfg(feature = "AudioSampleFormat")]
#[wasm_bindgen(method, setter = "format")]
fn format_shim(this: &AudioDataInit, val: AudioSampleFormat);
#[wasm_bindgen(method, setter = "numberOfChannels")]
fn number_of_channels_shim(this: &AudioDataInit, val: u32);
#[wasm_bindgen(method, setter = "numberOfFrames")]
fn number_of_frames_shim(this: &AudioDataInit, val: u32);
#[wasm_bindgen(method, setter = "sampleRate")]
fn sample_rate_shim(this: &AudioDataInit, val: f32);
#[wasm_bindgen(method, setter = "timestamp")]
fn timestamp_shim(this: &AudioDataInit, val: f64);
}
#[cfg(web_sys_unstable_apis)]
impl AudioDataInit {
@@ -50,13 +63,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("data"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.data_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -68,14 +75,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("format"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.format_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -86,17 +86,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfChannels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_channels_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -107,17 +97,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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_frames(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfFrames"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_frames_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -128,17 +108,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sampleRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sample_rate_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -149,17 +119,7 @@ impl AudioDataInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("timestamp"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.timestamp_shim(val);
self
}
}

View File

@@ -14,6 +14,14 @@ 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;
#[wasm_bindgen(method, setter = "codec")]
fn codec_shim(this: &AudioDecoderConfig, val: &str);
#[wasm_bindgen(method, setter = "description")]
fn description_shim(this: &AudioDecoderConfig, val: &::js_sys::Object);
#[wasm_bindgen(method, setter = "numberOfChannels")]
fn number_of_channels_shim(this: &AudioDecoderConfig, val: u32);
#[wasm_bindgen(method, setter = "sampleRate")]
fn sample_rate_shim(this: &AudioDecoderConfig, val: u32);
}
#[cfg(web_sys_unstable_apis)]
impl AudioDecoderConfig {
@@ -39,13 +47,7 @@ impl AudioDecoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("codec"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.codec_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -56,17 +58,7 @@ impl AudioDecoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("description"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.description_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -77,17 +69,7 @@ impl AudioDecoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfChannels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_channels_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -98,17 +80,7 @@ impl AudioDecoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sampleRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sample_rate_shim(val);
self
}
}

View File

@@ -14,6 +14,10 @@ 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;
#[wasm_bindgen(method, setter = "error")]
fn error_shim(this: &AudioDecoderInit, val: &::js_sys::Function);
#[wasm_bindgen(method, setter = "output")]
fn output_shim(this: &AudioDecoderInit, val: &::js_sys::Function);
}
#[cfg(web_sys_unstable_apis)]
impl AudioDecoderInit {
@@ -38,13 +42,7 @@ impl AudioDecoderInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.error_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -55,14 +53,7 @@ impl AudioDecoderInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("output"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.output_shim(val);
self
}
}

View File

@@ -14,6 +14,11 @@ 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(feature = "AudioDecoderConfig")]
#[wasm_bindgen(method, setter = "config")]
fn config_shim(this: &AudioDecoderSupport, val: &AudioDecoderConfig);
#[wasm_bindgen(method, setter = "supported")]
fn supported_shim(this: &AudioDecoderSupport, val: bool);
}
#[cfg(web_sys_unstable_apis)]
impl AudioDecoderSupport {
@@ -37,14 +42,7 @@ impl AudioDecoderSupport {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn config(&mut self, val: &AudioDecoderConfig) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("config"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.config_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -55,17 +53,7 @@ impl AudioDecoderSupport {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn supported(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("supported"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.supported_shim(val);
self
}
}

View File

@@ -14,6 +14,14 @@ 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 {
@@ -37,17 +45,7 @@ impl AudioEncoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bitrate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bitrate_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -58,13 +56,7 @@ impl AudioEncoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("codec"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.codec_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -75,17 +67,7 @@ impl AudioEncoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfChannels"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_channels_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -96,17 +78,7 @@ impl AudioEncoderConfig {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sampleRate"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.sample_rate_shim(val);
self
}
}

View File

@@ -14,6 +14,10 @@ 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;
#[wasm_bindgen(method, setter = "error")]
fn error_shim(this: &AudioEncoderInit, val: &::js_sys::Function);
#[wasm_bindgen(method, setter = "output")]
fn output_shim(this: &AudioEncoderInit, val: &::js_sys::Function);
}
#[cfg(web_sys_unstable_apis)]
impl AudioEncoderInit {
@@ -38,13 +42,7 @@ impl AudioEncoderInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.error_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -55,14 +53,7 @@ impl AudioEncoderInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("output"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.output_shim(val);
self
}
}

View File

@@ -14,6 +14,11 @@ 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(feature = "AudioEncoderConfig")]
#[wasm_bindgen(method, setter = "config")]
fn config_shim(this: &AudioEncoderSupport, val: &AudioEncoderConfig);
#[wasm_bindgen(method, setter = "supported")]
fn supported_shim(this: &AudioEncoderSupport, val: bool);
}
#[cfg(web_sys_unstable_apis)]
impl AudioEncoderSupport {
@@ -37,14 +42,7 @@ impl AudioEncoderSupport {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn config(&mut self, val: &AudioEncoderConfig) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("config"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.config_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -55,17 +53,7 @@ impl AudioEncoderSupport {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn supported(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("supported"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.supported_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"]
pub type AudioNodeOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &AudioNodeOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &AudioNodeOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &AudioNodeOptions, val: ChannelInterpretation);
}
impl AudioNodeOptions {
#[doc = "Construct a new `AudioNodeOptions`."]
@@ -24,17 +32,7 @@ impl AudioNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +40,7 @@ impl AudioNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,17 +48,7 @@ impl AudioNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
}

View File

@@ -14,6 +14,9 @@ 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(feature = "AudioSinkType")]
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &AudioSinkOptions, val: AudioSinkType);
}
#[cfg(web_sys_unstable_apis)]
impl AudioSinkOptions {
@@ -39,13 +42,7 @@ impl AudioSinkOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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: AudioSinkType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,22 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub type AudioWorkletNodeOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &AudioWorkletNodeOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &AudioWorkletNodeOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &AudioWorkletNodeOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "numberOfInputs")]
fn number_of_inputs_shim(this: &AudioWorkletNodeOptions, val: u32);
#[wasm_bindgen(method, setter = "numberOfOutputs")]
fn number_of_outputs_shim(this: &AudioWorkletNodeOptions, val: u32);
#[wasm_bindgen(method, setter = "outputChannelCount")]
fn output_channel_count_shim(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "processorOptions")]
fn processor_options_shim(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>);
}
impl AudioWorkletNodeOptions {
#[doc = "Construct a new `AudioWorkletNodeOptions`."]
@@ -24,17 +40,7 @@ impl AudioWorkletNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +48,7 @@ impl AudioWorkletNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,85 +56,35 @@ impl AudioWorkletNodeOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `numberOfInputs` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn number_of_inputs(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfInputs"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_inputs_shim(val);
self
}
#[doc = "Change the `numberOfOutputs` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn number_of_outputs(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfOutputs"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_outputs_shim(val);
self
}
#[doc = "Change the `outputChannelCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn output_channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("outputChannelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.output_channel_count_shim(val);
self
}
#[doc = "Change the `processorOptions` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn processor_options(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("processorOptions"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.processor_options_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub type AuthenticationExtensionsClientInputs;
#[wasm_bindgen(method, setter = "appid")]
fn appid_shim(this: &AuthenticationExtensionsClientInputs, val: &str);
}
impl AuthenticationExtensionsClientInputs {
#[doc = "Construct a new `AuthenticationExtensionsClientInputs`."]
@@ -24,13 +26,7 @@ impl AuthenticationExtensionsClientInputs {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub fn appid(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("appid"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.appid_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub type AuthenticationExtensionsClientOutputs;
#[wasm_bindgen(method, setter = "appid")]
fn appid_shim(this: &AuthenticationExtensionsClientOutputs, val: bool);
}
impl AuthenticationExtensionsClientOutputs {
#[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."]
@@ -24,13 +26,7 @@ impl AuthenticationExtensionsClientOutputs {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub fn appid(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("appid"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.appid_shim(val);
self
}
}

View File

@@ -10,6 +10,20 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"]
pub type AuthenticatorSelectionCriteria;
#[cfg(feature = "AuthenticatorAttachment")]
#[wasm_bindgen(method, setter = "authenticatorAttachment")]
fn authenticator_attachment_shim(
this: &AuthenticatorSelectionCriteria,
val: AuthenticatorAttachment,
);
#[wasm_bindgen(method, setter = "requireResidentKey")]
fn require_resident_key_shim(this: &AuthenticatorSelectionCriteria, val: bool);
#[cfg(feature = "UserVerificationRequirement")]
#[wasm_bindgen(method, setter = "userVerification")]
fn user_verification_shim(
this: &AuthenticatorSelectionCriteria,
val: UserVerificationRequirement,
);
}
impl AuthenticatorSelectionCriteria {
#[doc = "Construct a new `AuthenticatorSelectionCriteria`."]
@@ -25,34 +39,14 @@ impl AuthenticatorSelectionCriteria {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"]
pub fn authenticator_attachment(&mut self, val: AuthenticatorAttachment) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("authenticatorAttachment"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.authenticator_attachment_shim(val);
self
}
#[doc = "Change the `requireResidentKey` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"]
pub fn require_resident_key(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("requireResidentKey"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.require_resident_key_shim(val);
self
}
#[cfg(feature = "UserVerificationRequirement")]
@@ -60,17 +54,7 @@ impl AuthenticatorSelectionCriteria {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"]
pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("userVerification"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.user_verification_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub type AutocompleteInfo;
#[wasm_bindgen(method, setter = "addressType")]
fn address_type_shim(this: &AutocompleteInfo, val: &str);
#[wasm_bindgen(method, setter = "contactType")]
fn contact_type_shim(this: &AutocompleteInfo, val: &str);
#[wasm_bindgen(method, setter = "fieldName")]
fn field_name_shim(this: &AutocompleteInfo, val: &str);
#[wasm_bindgen(method, setter = "section")]
fn section_shim(this: &AutocompleteInfo, val: &str);
}
impl AutocompleteInfo {
#[doc = "Construct a new `AutocompleteInfo`."]
@@ -24,68 +32,28 @@ impl AutocompleteInfo {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub fn address_type(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("addressType"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.address_type_shim(val);
self
}
#[doc = "Change the `contactType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub fn contact_type(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("contactType"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.contact_type_shim(val);
self
}
#[doc = "Change the `fieldName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub fn field_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("fieldName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.field_name_shim(val);
self
}
#[doc = "Change the `section` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub fn section(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("section"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.section_shim(val);
self
}
}

View File

@@ -10,6 +10,17 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub type BaseComputedKeyframe;
#[cfg(feature = "CompositeOperation")]
#[wasm_bindgen(method, setter = "composite")]
fn composite_shim(this: &BaseComputedKeyframe, val: Option<CompositeOperation>);
#[wasm_bindgen(method, setter = "easing")]
fn easing_shim(this: &BaseComputedKeyframe, val: &str);
#[wasm_bindgen(method, setter = "offset")]
fn offset_shim(this: &BaseComputedKeyframe, val: Option<f64>);
#[wasm_bindgen(method, setter = "simulateComputeValuesFailure")]
fn simulate_compute_values_failure_shim(this: &BaseComputedKeyframe, val: bool);
#[wasm_bindgen(method, setter = "computedOffset")]
fn computed_offset_shim(this: &BaseComputedKeyframe, val: f64);
}
impl BaseComputedKeyframe {
#[doc = "Construct a new `BaseComputedKeyframe`."]
@@ -25,79 +36,35 @@ impl BaseComputedKeyframe {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"]
pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composite"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composite_shim(val);
self
}
#[doc = "Change the `easing` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub fn easing(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.easing_shim(val);
self
}
#[doc = "Change the `offset` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.offset_shim(val);
self
}
#[doc = "Change the `simulateComputeValuesFailure` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("simulateComputeValuesFailure"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.simulate_compute_values_failure_shim(val);
self
}
#[doc = "Change the `computedOffset` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub fn computed_offset(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("computedOffset"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.computed_offset_shim(val);
self
}
}

View File

@@ -10,6 +10,15 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub type BaseKeyframe;
#[cfg(feature = "CompositeOperation")]
#[wasm_bindgen(method, setter = "composite")]
fn composite_shim(this: &BaseKeyframe, val: Option<CompositeOperation>);
#[wasm_bindgen(method, setter = "easing")]
fn easing_shim(this: &BaseKeyframe, val: &str);
#[wasm_bindgen(method, setter = "offset")]
fn offset_shim(this: &BaseKeyframe, val: Option<f64>);
#[wasm_bindgen(method, setter = "simulateComputeValuesFailure")]
fn simulate_compute_values_failure_shim(this: &BaseKeyframe, val: bool);
}
impl BaseKeyframe {
#[doc = "Construct a new `BaseKeyframe`."]
@@ -25,62 +34,28 @@ impl BaseKeyframe {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"]
pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composite"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composite_shim(val);
self
}
#[doc = "Change the `easing` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub fn easing(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.easing_shim(val);
self
}
#[doc = "Change the `offset` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.offset_shim(val);
self
}
#[doc = "Change the `simulateComputeValuesFailure` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("simulateComputeValuesFailure"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.simulate_compute_values_failure_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub type BasePropertyIndexedKeyframe;
#[wasm_bindgen(method, setter = "composite")]
fn composite_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "easing")]
fn easing_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "offset")]
fn offset_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue);
}
impl BasePropertyIndexedKeyframe {
#[doc = "Construct a new `BasePropertyIndexedKeyframe`."]
@@ -24,45 +30,21 @@ impl BasePropertyIndexedKeyframe {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub fn composite(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composite"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composite_shim(val);
self
}
#[doc = "Change the `easing` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub fn easing(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.easing_shim(val);
self
}
#[doc = "Change the `offset` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub fn offset(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.offset_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
pub type BasicCardRequest;
#[wasm_bindgen(method, setter = "supportedNetworks")]
fn supported_networks_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "supportedTypes")]
fn supported_types_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue);
}
impl BasicCardRequest {
#[doc = "Construct a new `BasicCardRequest`."]
@@ -24,34 +28,14 @@ impl BasicCardRequest {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
pub fn supported_networks(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("supportedNetworks"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.supported_networks_shim(val);
self
}
#[doc = "Change the `supportedTypes` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
pub fn supported_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("supportedTypes"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.supported_types_shim(val);
self
}
}

View File

@@ -10,6 +10,19 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub type BasicCardResponse;
#[cfg(feature = "PaymentAddress")]
#[wasm_bindgen(method, setter = "billingAddress")]
fn billing_address_shim(this: &BasicCardResponse, val: Option<&PaymentAddress>);
#[wasm_bindgen(method, setter = "cardNumber")]
fn card_number_shim(this: &BasicCardResponse, val: &str);
#[wasm_bindgen(method, setter = "cardSecurityCode")]
fn card_security_code_shim(this: &BasicCardResponse, val: &str);
#[wasm_bindgen(method, setter = "cardholderName")]
fn cardholder_name_shim(this: &BasicCardResponse, val: &str);
#[wasm_bindgen(method, setter = "expiryMonth")]
fn expiry_month_shim(this: &BasicCardResponse, val: &str);
#[wasm_bindgen(method, setter = "expiryYear")]
fn expiry_year_shim(this: &BasicCardResponse, val: &str);
}
impl BasicCardResponse {
#[doc = "Construct a new `BasicCardResponse`."]
@@ -26,102 +39,42 @@ impl BasicCardResponse {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"]
pub fn billing_address(&mut self, val: Option<&PaymentAddress>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("billingAddress"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.billing_address_shim(val);
self
}
#[doc = "Change the `cardNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn card_number(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cardNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.card_number_shim(val);
self
}
#[doc = "Change the `cardSecurityCode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn card_security_code(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cardSecurityCode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.card_security_code_shim(val);
self
}
#[doc = "Change the `cardholderName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn cardholder_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cardholderName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cardholder_name_shim(val);
self
}
#[doc = "Change the `expiryMonth` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn expiry_month(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("expiryMonth"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.expiry_month_shim(val);
self
}
#[doc = "Change the `expiryYear` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn expiry_year(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("expiryYear"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.expiry_year_shim(val);
self
}
}

View File

@@ -10,6 +10,25 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub type BiquadFilterOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &BiquadFilterOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &BiquadFilterOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &BiquadFilterOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "Q")]
fn q_shim(this: &BiquadFilterOptions, val: f32);
#[wasm_bindgen(method, setter = "detune")]
fn detune_shim(this: &BiquadFilterOptions, val: f32);
#[wasm_bindgen(method, setter = "frequency")]
fn frequency_shim(this: &BiquadFilterOptions, val: f32);
#[wasm_bindgen(method, setter = "gain")]
fn gain_shim(this: &BiquadFilterOptions, val: f32);
#[cfg(feature = "BiquadFilterType")]
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &BiquadFilterOptions, val: BiquadFilterType);
}
impl BiquadFilterOptions {
#[doc = "Construct a new `BiquadFilterOptions`."]
@@ -24,17 +43,7 @@ impl BiquadFilterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +51,7 @@ impl BiquadFilterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,74 +59,35 @@ impl BiquadFilterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `Q` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn q(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("Q"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.q_shim(val);
self
}
#[doc = "Change the `detune` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn detune(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("detune"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.detune_shim(val);
self
}
#[doc = "Change the `frequency` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn frequency(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("frequency"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.frequency_shim(val);
self
}
#[doc = "Change the `gain` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn gain(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("gain"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.gain_shim(val);
self
}
#[cfg(feature = "BiquadFilterType")]
@@ -135,13 +95,7 @@ impl BiquadFilterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"]
pub fn type_(&mut self, val: BiquadFilterType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,15 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub type BlobEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &BlobEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &BlobEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &BlobEventInit, val: bool);
#[cfg(feature = "Blob")]
#[wasm_bindgen(method, setter = "data")]
fn data_shim(this: &BlobEventInit, val: Option<&Blob>);
}
impl BlobEventInit {
#[doc = "Construct a new `BlobEventInit`."]
@@ -24,51 +33,21 @@ impl BlobEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[cfg(feature = "Blob")]
@@ -76,13 +55,7 @@ impl BlobEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"]
pub fn data(&mut self, val: Option<&Blob>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("data"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.data_shim(val);
self
}
}

View File

@@ -10,6 +10,11 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
pub type BlobPropertyBag;
#[cfg(feature = "EndingTypes")]
#[wasm_bindgen(method, setter = "endings")]
fn endings_shim(this: &BlobPropertyBag, val: EndingTypes);
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &BlobPropertyBag, val: &str);
}
impl BlobPropertyBag {
#[doc = "Construct a new `BlobPropertyBag`."]
@@ -25,30 +30,14 @@ impl BlobPropertyBag {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"]
pub fn endings(&mut self, val: EndingTypes) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("endings"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.endings_shim(val);
self
}
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
pub fn type_(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"]
pub type BlockParsingOptions;
#[wasm_bindgen(method, setter = "blockScriptCreated")]
fn block_script_created_shim(this: &BlockParsingOptions, val: bool);
}
impl BlockParsingOptions {
#[doc = "Construct a new `BlockParsingOptions`."]
@@ -24,17 +26,7 @@ impl BlockParsingOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"]
pub fn block_script_created(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("blockScriptCreated"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.block_script_created_shim(val);
self
}
}

View File

@@ -14,6 +14,34 @@ 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 {
@@ -38,17 +66,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -59,17 +77,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -80,17 +88,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -101,17 +99,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("appearance"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.appearance_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -123,14 +111,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("device"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.device_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -142,17 +123,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("manufacturerData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.manufacturer_data_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -163,13 +134,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -180,13 +145,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("rssi"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.rssi_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -198,17 +157,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("serviceData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.service_data_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -219,17 +168,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("txPower"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.tx_power_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -240,13 +179,7 @@ impl BluetoothAdvertisingEventInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn uuids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("uuids"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.uuids_shim(val);
self
}
}

View File

@@ -14,6 +14,10 @@ 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;
#[wasm_bindgen(method, setter = "dataPrefix")]
fn data_prefix_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object);
#[wasm_bindgen(method, setter = "mask")]
fn mask_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object);
}
#[cfg(web_sys_unstable_apis)]
impl BluetoothDataFilterInit {
@@ -36,17 +40,7 @@ impl BluetoothDataFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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_prefix(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("dataPrefix"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.data_prefix_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -57,13 +51,7 @@ impl BluetoothDataFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn mask(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mask"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.mask_shim(val);
self
}
}

View File

@@ -14,6 +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 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 {
@@ -36,17 +46,7 @@ impl BluetoothLeScanFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("manufacturerData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.manufacturer_data_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -57,13 +57,7 @@ impl BluetoothLeScanFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -74,17 +68,7 @@ impl BluetoothLeScanFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("namePrefix"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_prefix_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -95,17 +79,7 @@ impl BluetoothLeScanFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("serviceData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.service_data_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -116,17 +90,7 @@ impl BluetoothLeScanFilterInit {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("services"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.services_shim(val);
self
}
}

View File

@@ -14,6 +14,17 @@ 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(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 {
@@ -39,13 +50,7 @@ impl BluetoothPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -56,17 +61,7 @@ impl BluetoothPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("acceptAllDevices"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.accept_all_devices_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -77,17 +72,7 @@ impl BluetoothPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("deviceId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.device_id_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -98,17 +83,7 @@ impl BluetoothPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("filters"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.filters_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -119,17 +94,7 @@ impl BluetoothPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("optionalServices"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.optional_services_shim(val);
self
}
}

View File

@@ -14,6 +14,8 @@ 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;
#[wasm_bindgen(method, setter = "allowedDevices")]
fn allowed_devices_shim(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue);
}
#[cfg(web_sys_unstable_apis)]
impl BluetoothPermissionStorage {
@@ -37,17 +39,7 @@ impl BluetoothPermissionStorage {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("allowedDevices"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.allowed_devices_shim(val);
self
}
}

View File

@@ -10,6 +10,11 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
pub type BoxQuadOptions;
#[cfg(feature = "CssBoxType")]
#[wasm_bindgen(method, setter = "box")]
fn box__shim(this: &BoxQuadOptions, val: CssBoxType);
#[wasm_bindgen(method, setter = "relativeTo")]
fn relative_to_shim(this: &BoxQuadOptions, val: &::js_sys::Object);
}
impl BoxQuadOptions {
#[doc = "Construct a new `BoxQuadOptions`."]
@@ -25,30 +30,14 @@ impl BoxQuadOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"]
pub fn box_(&mut self, val: CssBoxType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("box"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.box__shim(val);
self
}
#[doc = "Change the `relativeTo` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
pub fn relative_to(&mut self, val: &::js_sys::Object) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("relativeTo"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.relative_to_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
pub type BrowserElementDownloadOptions;
#[wasm_bindgen(method, setter = "filename")]
fn filename_shim(this: &BrowserElementDownloadOptions, val: Option<&str>);
#[wasm_bindgen(method, setter = "referrer")]
fn referrer_shim(this: &BrowserElementDownloadOptions, val: Option<&str>);
}
impl BrowserElementDownloadOptions {
#[doc = "Construct a new `BrowserElementDownloadOptions`."]
@@ -24,34 +28,14 @@ impl BrowserElementDownloadOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
pub fn filename(&mut self, val: Option<&str>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("filename"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.filename_shim(val);
self
}
#[doc = "Change the `referrer` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
pub fn referrer(&mut self, val: Option<&str>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("referrer"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.referrer_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
pub type BrowserElementExecuteScriptOptions;
#[wasm_bindgen(method, setter = "origin")]
fn origin_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>);
#[wasm_bindgen(method, setter = "url")]
fn url_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>);
}
impl BrowserElementExecuteScriptOptions {
#[doc = "Construct a new `BrowserElementExecuteScriptOptions`."]
@@ -24,27 +28,14 @@ impl BrowserElementExecuteScriptOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
pub fn origin(&mut self, val: Option<&str>) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("origin"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.origin_shim(val);
self
}
#[doc = "Change the `url` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
pub fn url(&mut self, val: Option<&str>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("url"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.url_shim(val);
self
}
}

View File

@@ -10,6 +10,17 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
pub type CacheBatchOperation;
#[cfg(feature = "CacheQueryOptions")]
#[wasm_bindgen(method, setter = "options")]
fn options_shim(this: &CacheBatchOperation, val: &CacheQueryOptions);
#[cfg(feature = "Request")]
#[wasm_bindgen(method, setter = "request")]
fn request_shim(this: &CacheBatchOperation, val: &Request);
#[cfg(feature = "Response")]
#[wasm_bindgen(method, setter = "response")]
fn response_shim(this: &CacheBatchOperation, val: &Response);
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &CacheBatchOperation, val: &str);
}
impl CacheBatchOperation {
#[doc = "Construct a new `CacheBatchOperation`."]
@@ -25,17 +36,7 @@ impl CacheBatchOperation {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"]
pub fn options(&mut self, val: &CacheQueryOptions) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("options"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.options_shim(val);
self
}
#[cfg(feature = "Request")]
@@ -43,17 +44,7 @@ impl CacheBatchOperation {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"]
pub fn request(&mut self, val: &Request) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("request"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.request_shim(val);
self
}
#[cfg(feature = "Response")]
@@ -61,30 +52,14 @@ impl CacheBatchOperation {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"]
pub fn response(&mut self, val: &Response) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("response"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.response_shim(val);
self
}
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
pub fn type_(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub type CacheQueryOptions;
#[wasm_bindgen(method, setter = "cacheName")]
fn cache_name_shim(this: &CacheQueryOptions, val: &str);
#[wasm_bindgen(method, setter = "ignoreMethod")]
fn ignore_method_shim(this: &CacheQueryOptions, val: bool);
#[wasm_bindgen(method, setter = "ignoreSearch")]
fn ignore_search_shim(this: &CacheQueryOptions, val: bool);
#[wasm_bindgen(method, setter = "ignoreVary")]
fn ignore_vary_shim(this: &CacheQueryOptions, val: bool);
}
impl CacheQueryOptions {
#[doc = "Construct a new `CacheQueryOptions`."]
@@ -24,68 +32,28 @@ impl CacheQueryOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub fn cache_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cacheName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cache_name_shim(val);
self
}
#[doc = "Change the `ignoreMethod` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub fn ignore_method(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("ignoreMethod"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ignore_method_shim(val);
self
}
#[doc = "Change the `ignoreSearch` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub fn ignore_search(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("ignoreSearch"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ignore_search_shim(val);
self
}
#[doc = "Change the `ignoreVary` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub fn ignore_vary(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("ignoreVary"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ignore_vary_shim(val);
self
}
}

View File

@@ -10,6 +10,30 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub type CaretStateChangedEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &CaretStateChangedEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &CaretStateChangedEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &CaretStateChangedEventInit, val: bool);
#[cfg(feature = "DomRectReadOnly")]
#[wasm_bindgen(method, setter = "boundingClientRect")]
fn bounding_client_rect_shim(this: &CaretStateChangedEventInit, val: Option<&DomRectReadOnly>);
#[wasm_bindgen(method, setter = "caretVisible")]
fn caret_visible_shim(this: &CaretStateChangedEventInit, val: bool);
#[wasm_bindgen(method, setter = "caretVisuallyVisible")]
fn caret_visually_visible_shim(this: &CaretStateChangedEventInit, val: bool);
#[wasm_bindgen(method, setter = "collapsed")]
fn collapsed_shim(this: &CaretStateChangedEventInit, val: bool);
#[cfg(feature = "CaretChangedReason")]
#[wasm_bindgen(method, setter = "reason")]
fn reason_shim(this: &CaretStateChangedEventInit, val: CaretChangedReason);
#[wasm_bindgen(method, setter = "selectedTextContent")]
fn selected_text_content_shim(this: &CaretStateChangedEventInit, val: &str);
#[wasm_bindgen(method, setter = "selectionEditable")]
fn selection_editable_shim(this: &CaretStateChangedEventInit, val: bool);
#[wasm_bindgen(method, setter = "selectionVisible")]
fn selection_visible_shim(this: &CaretStateChangedEventInit, val: bool);
}
impl CaretStateChangedEventInit {
#[doc = "Construct a new `CaretStateChangedEventInit`."]
@@ -24,51 +48,21 @@ impl CaretStateChangedEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[cfg(feature = "DomRectReadOnly")]
@@ -76,68 +70,28 @@ impl CaretStateChangedEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"]
pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("boundingClientRect"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bounding_client_rect_shim(val);
self
}
#[doc = "Change the `caretVisible` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn caret_visible(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("caretVisible"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.caret_visible_shim(val);
self
}
#[doc = "Change the `caretVisuallyVisible` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("caretVisuallyVisible"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.caret_visually_visible_shim(val);
self
}
#[doc = "Change the `collapsed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn collapsed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("collapsed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.collapsed_shim(val);
self
}
#[cfg(feature = "CaretChangedReason")]
@@ -145,65 +99,28 @@ impl CaretStateChangedEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"]
pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("reason"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.reason_shim(val);
self
}
#[doc = "Change the `selectedTextContent` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn selected_text_content(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("selectedTextContent"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.selected_text_content_shim(val);
self
}
#[doc = "Change the `selectionEditable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn selection_editable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("selectionEditable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.selection_editable_shim(val);
self
}
#[doc = "Change the `selectionVisible` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"]
pub fn selection_visible(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("selectionVisible"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.selection_visible_shim(val);
self
}
}

View File

@@ -10,6 +10,16 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
pub type ChannelMergerOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &ChannelMergerOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &ChannelMergerOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &ChannelMergerOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "numberOfInputs")]
fn number_of_inputs_shim(this: &ChannelMergerOptions, val: u32);
}
impl ChannelMergerOptions {
#[doc = "Construct a new `ChannelMergerOptions`."]
@@ -24,17 +34,7 @@ impl ChannelMergerOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +42,7 @@ impl ChannelMergerOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,34 +50,14 @@ impl ChannelMergerOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `numberOfInputs` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
pub fn number_of_inputs(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfInputs"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_inputs_shim(val);
self
}
}

View File

@@ -10,6 +10,16 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
pub type ChannelSplitterOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &ChannelSplitterOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &ChannelSplitterOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &ChannelSplitterOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "numberOfOutputs")]
fn number_of_outputs_shim(this: &ChannelSplitterOptions, val: u32);
}
impl ChannelSplitterOptions {
#[doc = "Construct a new `ChannelSplitterOptions`."]
@@ -24,17 +34,7 @@ impl ChannelSplitterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +42,7 @@ impl ChannelSplitterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,34 +50,14 @@ impl ChannelSplitterOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `numberOfOutputs` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
pub fn number_of_outputs(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("numberOfOutputs"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.number_of_outputs_shim(val);
self
}
}

View File

@@ -10,6 +10,15 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
pub type CheckerboardReport;
#[wasm_bindgen(method, setter = "log")]
fn log_shim(this: &CheckerboardReport, val: &str);
#[cfg(feature = "CheckerboardReason")]
#[wasm_bindgen(method, setter = "reason")]
fn reason_shim(this: &CheckerboardReport, val: CheckerboardReason);
#[wasm_bindgen(method, setter = "severity")]
fn severity_shim(this: &CheckerboardReport, val: u32);
#[wasm_bindgen(method, setter = "timestamp")]
fn timestamp_shim(this: &CheckerboardReport, val: f64);
}
impl CheckerboardReport {
#[doc = "Construct a new `CheckerboardReport`."]
@@ -24,13 +33,7 @@ impl CheckerboardReport {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
pub fn log(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("log"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.log_shim(val);
self
}
#[cfg(feature = "CheckerboardReason")]
@@ -38,48 +41,21 @@ impl CheckerboardReport {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"]
pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("reason"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.reason_shim(val);
self
}
#[doc = "Change the `severity` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
pub fn severity(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("severity"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.severity_shim(val);
self
}
#[doc = "Change the `timestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
pub fn timestamp(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("timestamp"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.timestamp_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"]
pub type ChromeFilePropertyBag;
#[wasm_bindgen(method, setter = "lastModified")]
fn last_modified_shim(this: &ChromeFilePropertyBag, val: f64);
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &ChromeFilePropertyBag, val: &str);
#[wasm_bindgen(method, setter = "existenceCheck")]
fn existence_check_shim(this: &ChromeFilePropertyBag, val: bool);
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &ChromeFilePropertyBag, val: &str);
}
impl ChromeFilePropertyBag {
#[doc = "Construct a new `ChromeFilePropertyBag`."]
@@ -24,60 +32,28 @@ impl ChromeFilePropertyBag {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"]
pub fn last_modified(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("lastModified"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.last_modified_shim(val);
self
}
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"]
pub fn type_(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
#[doc = "Change the `existenceCheck` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"]
pub fn existence_check(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("existenceCheck"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.existence_check_shim(val);
self
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
}

View File

@@ -10,6 +10,11 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
pub type ClientQueryOptions;
#[wasm_bindgen(method, setter = "includeUncontrolled")]
fn include_uncontrolled_shim(this: &ClientQueryOptions, val: bool);
#[cfg(feature = "ClientType")]
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &ClientQueryOptions, val: ClientType);
}
impl ClientQueryOptions {
#[doc = "Construct a new `ClientQueryOptions`."]
@@ -24,17 +29,7 @@ impl ClientQueryOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
pub fn include_uncontrolled(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("includeUncontrolled"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.include_uncontrolled_shim(val);
self
}
#[cfg(feature = "ClientType")]
@@ -42,13 +37,7 @@ impl ClientQueryOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"]
pub fn type_(&mut self, val: ClientType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,11 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"]
pub type ClientRectsAndTexts;
#[cfg(feature = "DomRectList")]
#[wasm_bindgen(method, setter = "rectList")]
fn rect_list_shim(this: &ClientRectsAndTexts, val: &DomRectList);
#[wasm_bindgen(method, setter = "textList")]
fn text_list_shim(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue);
}
impl ClientRectsAndTexts {
#[cfg(feature = "DomRectList")]
@@ -28,34 +33,14 @@ impl ClientRectsAndTexts {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"]
pub fn rect_list(&mut self, val: &DomRectList) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("rectList"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.rect_list_shim(val);
self
}
#[doc = "Change the `textList` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"]
pub fn text_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("textList"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.text_list_shim(val);
self
}
}

View File

@@ -10,6 +10,15 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"]
pub type ClipboardEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &ClipboardEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &ClipboardEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &ClipboardEventInit, val: bool);
#[cfg(feature = "DataTransfer")]
#[wasm_bindgen(method, setter = "clipboardData")]
fn clipboard_data_shim(this: &ClipboardEventInit, val: Option<&DataTransfer>);
}
impl ClipboardEventInit {
#[doc = "Construct a new `ClipboardEventInit`."]
@@ -24,51 +33,21 @@ impl ClipboardEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[cfg(feature = "DataTransfer")]
@@ -76,17 +55,7 @@ impl ClipboardEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"]
pub fn clipboard_data(&mut self, val: Option<&DataTransfer>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("clipboardData"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.clipboard_data_shim(val);
self
}
}

View File

@@ -14,6 +14,9 @@ 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 ClipboardItemOptions;
#[cfg(feature = "PresentationStyle")]
#[wasm_bindgen(method, setter = "presentationStyle")]
fn presentation_style_shim(this: &ClipboardItemOptions, val: PresentationStyle);
}
#[cfg(web_sys_unstable_apis)]
impl ClipboardItemOptions {
@@ -37,17 +40,7 @@ impl ClipboardItemOptions {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn presentation_style(&mut self, val: PresentationStyle) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("presentationStyle"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.presentation_style_shim(val);
self
}
}

View File

@@ -14,6 +14,11 @@ 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(feature = "PermissionName")]
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &ClipboardPermissionDescriptor, val: PermissionName);
#[wasm_bindgen(method, setter = "allowWithoutGesture")]
fn allow_without_gesture_shim(this: &ClipboardPermissionDescriptor, val: bool);
}
#[cfg(web_sys_unstable_apis)]
impl ClipboardPermissionDescriptor {
@@ -39,13 +44,7 @@ impl ClipboardPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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 {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
@@ -56,17 +55,7 @@ impl ClipboardPermissionDescriptor {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to 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_without_gesture(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("allowWithoutGesture"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.allow_without_gesture_shim(val);
self
}
}

View File

@@ -10,6 +10,18 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub type CloseEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &CloseEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &CloseEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &CloseEventInit, val: bool);
#[wasm_bindgen(method, setter = "code")]
fn code_shim(this: &CloseEventInit, val: u16);
#[wasm_bindgen(method, setter = "reason")]
fn reason_shim(this: &CloseEventInit, val: &str);
#[wasm_bindgen(method, setter = "wasClean")]
fn was_clean_shim(this: &CloseEventInit, val: bool);
}
impl CloseEventInit {
#[doc = "Construct a new `CloseEventInit`."]
@@ -24,95 +36,42 @@ impl CloseEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `code` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn code(&mut self, val: u16) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("code"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.code_shim(val);
self
}
#[doc = "Change the `reason` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn reason(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("reason"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.reason_shim(val);
self
}
#[doc = "Change the `wasClean` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"]
pub fn was_clean(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("wasClean"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.was_clean_shim(val);
self
}
}

View File

@@ -10,6 +10,22 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub type CollectedClientData;
#[wasm_bindgen(method, setter = "challenge")]
fn challenge_shim(this: &CollectedClientData, val: &str);
#[cfg(feature = "AuthenticationExtensionsClientInputs")]
#[wasm_bindgen(method, setter = "clientExtensions")]
fn client_extensions_shim(
this: &CollectedClientData,
val: &AuthenticationExtensionsClientInputs,
);
#[wasm_bindgen(method, setter = "hashAlgorithm")]
fn hash_algorithm_shim(this: &CollectedClientData, val: &str);
#[wasm_bindgen(method, setter = "origin")]
fn origin_shim(this: &CollectedClientData, val: &str);
#[wasm_bindgen(method, setter = "tokenBindingId")]
fn token_binding_id_shim(this: &CollectedClientData, val: &str);
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &CollectedClientData, val: &str);
}
impl CollectedClientData {
#[doc = "Construct a new `CollectedClientData`."]
@@ -28,17 +44,7 @@ impl CollectedClientData {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub fn challenge(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("challenge"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.challenge_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsClientInputs")]
@@ -46,78 +52,35 @@ impl CollectedClientData {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"]
pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("clientExtensions"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.client_extensions_shim(val);
self
}
#[doc = "Change the `hashAlgorithm` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub fn hash_algorithm(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("hashAlgorithm"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.hash_algorithm_shim(val);
self
}
#[doc = "Change the `origin` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub fn origin(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("origin"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.origin_shim(val);
self
}
#[doc = "Change the `tokenBindingId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub fn token_binding_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("tokenBindingId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.token_binding_id_shim(val);
self
}
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
pub fn type_(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,19 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub type CompositionEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &CompositionEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &CompositionEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &CompositionEventInit, val: bool);
#[wasm_bindgen(method, setter = "detail")]
fn detail_shim(this: &CompositionEventInit, val: i32);
#[cfg(feature = "Window")]
#[wasm_bindgen(method, setter = "view")]
fn view_shim(this: &CompositionEventInit, val: Option<&Window>);
#[wasm_bindgen(method, setter = "data")]
fn data_shim(this: &CompositionEventInit, val: &str);
}
impl CompositionEventInit {
#[doc = "Construct a new `CompositionEventInit`."]
@@ -24,65 +37,28 @@ impl CompositionEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `detail` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub fn detail(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("detail"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.detail_shim(val);
self
}
#[cfg(feature = "Window")]
@@ -90,26 +66,14 @@ impl CompositionEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"]
pub fn view(&mut self, val: Option<&Window>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("view"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.view_shim(val);
self
}
#[doc = "Change the `data` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
pub fn data(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("data"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.data_shim(val);
self
}
}

View File

@@ -10,6 +10,34 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub type ComputedEffectTiming;
#[wasm_bindgen(method, setter = "delay")]
fn delay_shim(this: &ComputedEffectTiming, val: f64);
#[cfg(feature = "PlaybackDirection")]
#[wasm_bindgen(method, setter = "direction")]
fn direction_shim(this: &ComputedEffectTiming, val: PlaybackDirection);
#[wasm_bindgen(method, setter = "duration")]
fn duration_shim(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "easing")]
fn easing_shim(this: &ComputedEffectTiming, val: &str);
#[wasm_bindgen(method, setter = "endDelay")]
fn end_delay_shim(this: &ComputedEffectTiming, val: f64);
#[cfg(feature = "FillMode")]
#[wasm_bindgen(method, setter = "fill")]
fn fill_shim(this: &ComputedEffectTiming, val: FillMode);
#[wasm_bindgen(method, setter = "iterationStart")]
fn iteration_start_shim(this: &ComputedEffectTiming, val: f64);
#[wasm_bindgen(method, setter = "iterations")]
fn iterations_shim(this: &ComputedEffectTiming, val: f64);
#[wasm_bindgen(method, setter = "activeDuration")]
fn active_duration_shim(this: &ComputedEffectTiming, val: f64);
#[wasm_bindgen(method, setter = "currentIteration")]
fn current_iteration_shim(this: &ComputedEffectTiming, val: Option<f64>);
#[wasm_bindgen(method, setter = "endTime")]
fn end_time_shim(this: &ComputedEffectTiming, val: f64);
#[wasm_bindgen(method, setter = "localTime")]
fn local_time_shim(this: &ComputedEffectTiming, val: Option<f64>);
#[wasm_bindgen(method, setter = "progress")]
fn progress_shim(this: &ComputedEffectTiming, val: Option<f64>);
}
impl ComputedEffectTiming {
#[doc = "Construct a new `ComputedEffectTiming`."]
@@ -24,13 +52,7 @@ impl ComputedEffectTiming {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn delay(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("delay"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.delay_shim(val);
self
}
#[cfg(feature = "PlaybackDirection")]
@@ -38,65 +60,28 @@ impl ComputedEffectTiming {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"]
pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("direction"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.direction_shim(val);
self
}
#[doc = "Change the `duration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("duration"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.duration_shim(val);
self
}
#[doc = "Change the `easing` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn easing(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.easing_shim(val);
self
}
#[doc = "Change the `endDelay` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn end_delay(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("endDelay"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.end_delay_shim(val);
self
}
#[cfg(feature = "FillMode")]
@@ -104,132 +89,56 @@ impl ComputedEffectTiming {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"]
pub fn fill(&mut self, val: FillMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("fill"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.fill_shim(val);
self
}
#[doc = "Change the `iterationStart` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn iteration_start(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("iterationStart"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.iteration_start_shim(val);
self
}
#[doc = "Change the `iterations` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn iterations(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("iterations"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.iterations_shim(val);
self
}
#[doc = "Change the `activeDuration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn active_duration(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("activeDuration"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.active_duration_shim(val);
self
}
#[doc = "Change the `currentIteration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn current_iteration(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("currentIteration"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.current_iteration_shim(val);
self
}
#[doc = "Change the `endTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn end_time(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("endTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.end_time_shim(val);
self
}
#[doc = "Change the `localTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn local_time(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("localTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.local_time_shim(val);
self
}
#[doc = "Change the `progress` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"]
pub fn progress(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("progress"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.progress_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"]
pub type ConnStatusDict;
#[wasm_bindgen(method, setter = "status")]
fn status_shim(this: &ConnStatusDict, val: &str);
}
impl ConnStatusDict {
#[doc = "Construct a new `ConnStatusDict`."]
@@ -24,14 +26,7 @@ impl ConnStatusDict {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"]
pub fn status(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("status"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.status_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"]
pub type ConsoleCounter;
#[wasm_bindgen(method, setter = "count")]
fn count_shim(this: &ConsoleCounter, val: u32);
#[wasm_bindgen(method, setter = "label")]
fn label_shim(this: &ConsoleCounter, val: &str);
}
impl ConsoleCounter {
#[doc = "Construct a new `ConsoleCounter`."]
@@ -24,26 +28,14 @@ impl ConsoleCounter {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"]
pub fn count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("count"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.count_shim(val);
self
}
#[doc = "Change the `label` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"]
pub fn label(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.label_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"]
pub type ConsoleCounterError;
#[wasm_bindgen(method, setter = "error")]
fn error_shim(this: &ConsoleCounterError, val: &str);
#[wasm_bindgen(method, setter = "label")]
fn label_shim(this: &ConsoleCounterError, val: &str);
}
impl ConsoleCounterError {
#[doc = "Construct a new `ConsoleCounterError`."]
@@ -24,26 +28,14 @@ impl ConsoleCounterError {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"]
pub fn error(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.error_shim(val);
self
}
#[doc = "Change the `label` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"]
pub fn label(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.label_shim(val);
self
}
}

View File

@@ -10,6 +10,40 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub type ConsoleEvent;
#[wasm_bindgen(method, setter = "ID")]
fn id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "addonId")]
fn addon_id_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "arguments")]
fn arguments_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "columnNumber")]
fn column_number_shim(this: &ConsoleEvent, val: u32);
#[wasm_bindgen(method, setter = "consoleID")]
fn console_id_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "counter")]
fn counter_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "filename")]
fn filename_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "functionName")]
fn function_name_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "groupName")]
fn group_name_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "innerID")]
fn inner_id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "level")]
fn level_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "lineNumber")]
fn line_number_shim(this: &ConsoleEvent, val: u32);
#[wasm_bindgen(method, setter = "prefix")]
fn prefix_shim(this: &ConsoleEvent, val: &str);
#[wasm_bindgen(method, setter = "private")]
fn private_shim(this: &ConsoleEvent, val: bool);
#[wasm_bindgen(method, setter = "styles")]
fn styles_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "timeStamp")]
fn time_stamp_shim(this: &ConsoleEvent, val: f64);
#[wasm_bindgen(method, setter = "timer")]
fn timer_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue);
}
impl ConsoleEvent {
#[doc = "Construct a new `ConsoleEvent`."]
@@ -24,271 +58,119 @@ impl ConsoleEvent {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ID"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.id_shim(val);
self
}
#[doc = "Change the `addonId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn addon_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("addonId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.addon_id_shim(val);
self
}
#[doc = "Change the `arguments` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("arguments"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.arguments_shim(val);
self
}
#[doc = "Change the `columnNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn column_number(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("columnNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.column_number_shim(val);
self
}
#[doc = "Change the `consoleID` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn console_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("consoleID"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.console_id_shim(val);
self
}
#[doc = "Change the `counter` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn counter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("counter"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.counter_shim(val);
self
}
#[doc = "Change the `filename` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn filename(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("filename"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.filename_shim(val);
self
}
#[doc = "Change the `functionName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn function_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("functionName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.function_name_shim(val);
self
}
#[doc = "Change the `groupName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn group_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("groupName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.group_name_shim(val);
self
}
#[doc = "Change the `innerID` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn inner_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("innerID"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.inner_id_shim(val);
self
}
#[doc = "Change the `level` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn level(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("level"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.level_shim(val);
self
}
#[doc = "Change the `lineNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn line_number(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("lineNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.line_number_shim(val);
self
}
#[doc = "Change the `prefix` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn prefix(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("prefix"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.prefix_shim(val);
self
}
#[doc = "Change the `private` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn private(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("private"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.private_shim(val);
self
}
#[doc = "Change the `styles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn styles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("styles"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.styles_shim(val);
self
}
#[doc = "Change the `timeStamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn time_stamp(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("timeStamp"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.time_stamp_shim(val);
self
}
#[doc = "Change the `timer` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
pub fn timer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("timer"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.timer_shim(val);
self
}
}

View File

@@ -10,6 +10,19 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub type ConsoleInstanceOptions;
#[wasm_bindgen(method, setter = "consoleID")]
fn console_id_shim(this: &ConsoleInstanceOptions, val: &str);
#[wasm_bindgen(method, setter = "dump")]
fn dump_shim(this: &ConsoleInstanceOptions, val: &::js_sys::Function);
#[wasm_bindgen(method, setter = "innerID")]
fn inner_id_shim(this: &ConsoleInstanceOptions, val: &str);
#[cfg(feature = "ConsoleLogLevel")]
#[wasm_bindgen(method, setter = "maxLogLevel")]
fn max_log_level_shim(this: &ConsoleInstanceOptions, val: ConsoleLogLevel);
#[wasm_bindgen(method, setter = "maxLogLevelPref")]
fn max_log_level_pref_shim(this: &ConsoleInstanceOptions, val: &str);
#[wasm_bindgen(method, setter = "prefix")]
fn prefix_shim(this: &ConsoleInstanceOptions, val: &str);
}
impl ConsoleInstanceOptions {
#[doc = "Construct a new `ConsoleInstanceOptions`."]
@@ -24,47 +37,21 @@ impl ConsoleInstanceOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub fn console_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("consoleID"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.console_id_shim(val);
self
}
#[doc = "Change the `dump` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub fn dump(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dump"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.dump_shim(val);
self
}
#[doc = "Change the `innerID` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub fn inner_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("innerID"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.inner_id_shim(val);
self
}
#[cfg(feature = "ConsoleLogLevel")]
@@ -72,48 +59,21 @@ impl ConsoleInstanceOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"]
pub fn max_log_level(&mut self, val: ConsoleLogLevel) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("maxLogLevel"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_log_level_shim(val);
self
}
#[doc = "Change the `maxLogLevelPref` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub fn max_log_level_pref(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("maxLogLevelPref"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_log_level_pref_shim(val);
self
}
#[doc = "Change the `prefix` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
pub fn prefix(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("prefix"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.prefix_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"]
pub type ConsoleProfileEvent;
#[wasm_bindgen(method, setter = "action")]
fn action_shim(this: &ConsoleProfileEvent, val: &str);
#[wasm_bindgen(method, setter = "arguments")]
fn arguments_shim(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue);
}
impl ConsoleProfileEvent {
#[doc = "Construct a new `ConsoleProfileEvent`."]
@@ -24,31 +28,14 @@ impl ConsoleProfileEvent {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"]
pub fn action(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("action"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.action_shim(val);
self
}
#[doc = "Change the `arguments` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"]
pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("arguments"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.arguments_shim(val);
self
}
}

View File

@@ -10,6 +10,16 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub type ConsoleStackEntry;
#[wasm_bindgen(method, setter = "asyncCause")]
fn async_cause_shim(this: &ConsoleStackEntry, val: Option<&str>);
#[wasm_bindgen(method, setter = "columnNumber")]
fn column_number_shim(this: &ConsoleStackEntry, val: u32);
#[wasm_bindgen(method, setter = "filename")]
fn filename_shim(this: &ConsoleStackEntry, val: &str);
#[wasm_bindgen(method, setter = "functionName")]
fn function_name_shim(this: &ConsoleStackEntry, val: &str);
#[wasm_bindgen(method, setter = "lineNumber")]
fn line_number_shim(this: &ConsoleStackEntry, val: u32);
}
impl ConsoleStackEntry {
#[doc = "Construct a new `ConsoleStackEntry`."]
@@ -24,85 +34,35 @@ impl ConsoleStackEntry {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub fn async_cause(&mut self, val: Option<&str>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("asyncCause"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.async_cause_shim(val);
self
}
#[doc = "Change the `columnNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub fn column_number(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("columnNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.column_number_shim(val);
self
}
#[doc = "Change the `filename` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub fn filename(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("filename"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.filename_shim(val);
self
}
#[doc = "Change the `functionName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub fn function_name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("functionName"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.function_name_shim(val);
self
}
#[doc = "Change the `lineNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"]
pub fn line_number(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("lineNumber"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.line_number_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"]
pub type ConsoleTimerError;
#[wasm_bindgen(method, setter = "error")]
fn error_shim(this: &ConsoleTimerError, val: &str);
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &ConsoleTimerError, val: &str);
}
impl ConsoleTimerError {
#[doc = "Construct a new `ConsoleTimerError`."]
@@ -24,26 +28,14 @@ impl ConsoleTimerError {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"]
pub fn error(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.error_shim(val);
self
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"]
pub type ConsoleTimerLogOrEnd;
#[wasm_bindgen(method, setter = "duration")]
fn duration_shim(this: &ConsoleTimerLogOrEnd, val: f64);
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &ConsoleTimerLogOrEnd, val: &str);
}
impl ConsoleTimerLogOrEnd {
#[doc = "Construct a new `ConsoleTimerLogOrEnd`."]
@@ -24,30 +28,14 @@ impl ConsoleTimerLogOrEnd {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"]
pub fn duration(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("duration"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.duration_shim(val);
self
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"]
pub type ConsoleTimerStart;
#[wasm_bindgen(method, setter = "name")]
fn name_shim(this: &ConsoleTimerStart, val: &str);
}
impl ConsoleTimerStart {
#[doc = "Construct a new `ConsoleTimerStart`."]
@@ -24,13 +26,7 @@ impl ConsoleTimerStart {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"]
pub fn name(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.name_shim(val);
self
}
}

View File

@@ -10,6 +10,8 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"]
pub type ConstantSourceOptions;
#[wasm_bindgen(method, setter = "offset")]
fn offset_shim(this: &ConstantSourceOptions, val: f32);
}
impl ConstantSourceOptions {
#[doc = "Construct a new `ConstantSourceOptions`."]
@@ -24,14 +26,7 @@ impl ConstantSourceOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"]
pub fn offset(&mut self, val: f32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.offset_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"]
pub type ConstrainBooleanParameters;
#[wasm_bindgen(method, setter = "exact")]
fn exact_shim(this: &ConstrainBooleanParameters, val: bool);
#[wasm_bindgen(method, setter = "ideal")]
fn ideal_shim(this: &ConstrainBooleanParameters, val: bool);
}
impl ConstrainBooleanParameters {
#[doc = "Construct a new `ConstrainBooleanParameters`."]
@@ -24,26 +28,14 @@ impl ConstrainBooleanParameters {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"]
pub fn exact(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("exact"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.exact_shim(val);
self
}
#[doc = "Change the `ideal` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"]
pub fn ideal(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ideal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ideal_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"]
pub type ConstrainDomStringParameters;
#[wasm_bindgen(method, setter = "exact")]
fn exact_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue);
#[wasm_bindgen(method, setter = "ideal")]
fn ideal_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue);
}
impl ConstrainDomStringParameters {
#[doc = "Construct a new `ConstrainDomStringParameters`."]
@@ -24,26 +28,14 @@ impl ConstrainDomStringParameters {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"]
pub fn exact(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("exact"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.exact_shim(val);
self
}
#[doc = "Change the `ideal` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"]
pub fn ideal(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ideal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ideal_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"]
pub type ConstrainDoubleRange;
#[wasm_bindgen(method, setter = "exact")]
fn exact_shim(this: &ConstrainDoubleRange, val: f64);
#[wasm_bindgen(method, setter = "ideal")]
fn ideal_shim(this: &ConstrainDoubleRange, val: f64);
#[wasm_bindgen(method, setter = "max")]
fn max_shim(this: &ConstrainDoubleRange, val: f64);
#[wasm_bindgen(method, setter = "min")]
fn min_shim(this: &ConstrainDoubleRange, val: f64);
}
impl ConstrainDoubleRange {
#[doc = "Construct a new `ConstrainDoubleRange`."]
@@ -24,52 +32,28 @@ impl ConstrainDoubleRange {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"]
pub fn exact(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("exact"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.exact_shim(val);
self
}
#[doc = "Change the `ideal` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"]
pub fn ideal(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ideal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ideal_shim(val);
self
}
#[doc = "Change the `max` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"]
pub fn max(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("max"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_shim(val);
self
}
#[doc = "Change the `min` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"]
pub fn min(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("min"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.min_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"]
pub type ConstrainLongRange;
#[wasm_bindgen(method, setter = "exact")]
fn exact_shim(this: &ConstrainLongRange, val: i32);
#[wasm_bindgen(method, setter = "ideal")]
fn ideal_shim(this: &ConstrainLongRange, val: i32);
#[wasm_bindgen(method, setter = "max")]
fn max_shim(this: &ConstrainLongRange, val: i32);
#[wasm_bindgen(method, setter = "min")]
fn min_shim(this: &ConstrainLongRange, val: i32);
}
impl ConstrainLongRange {
#[doc = "Construct a new `ConstrainLongRange`."]
@@ -24,52 +32,28 @@ impl ConstrainLongRange {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"]
pub fn exact(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("exact"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.exact_shim(val);
self
}
#[doc = "Change the `ideal` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"]
pub fn ideal(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ideal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.ideal_shim(val);
self
}
#[doc = "Change the `max` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"]
pub fn max(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("max"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_shim(val);
self
}
#[doc = "Change the `min` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"]
pub fn min(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("min"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.min_shim(val);
self
}
}

View File

@@ -10,6 +10,10 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"]
pub type ContextAttributes2d;
#[wasm_bindgen(method, setter = "alpha")]
fn alpha_shim(this: &ContextAttributes2d, val: bool);
#[wasm_bindgen(method, setter = "willReadFrequently")]
fn will_read_frequently_shim(this: &ContextAttributes2d, val: bool);
}
impl ContextAttributes2d {
#[doc = "Construct a new `ContextAttributes2d`."]
@@ -24,30 +28,14 @@ impl ContextAttributes2d {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"]
pub fn alpha(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("alpha"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.alpha_shim(val);
self
}
#[doc = "Change the `willReadFrequently` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"]
pub fn will_read_frequently(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("willReadFrequently"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.will_read_frequently_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`*"]
pub type ConvertCoordinateOptions;
#[cfg(feature = "CssBoxType")]
#[wasm_bindgen(method, setter = "fromBox")]
fn from_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType);
#[cfg(feature = "CssBoxType")]
#[wasm_bindgen(method, setter = "toBox")]
fn to_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType);
}
impl ConvertCoordinateOptions {
#[doc = "Construct a new `ConvertCoordinateOptions`."]
@@ -25,17 +31,7 @@ impl ConvertCoordinateOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"]
pub fn from_box(&mut self, val: CssBoxType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("fromBox"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.from_box_shim(val);
self
}
#[cfg(feature = "CssBoxType")]
@@ -43,13 +39,7 @@ impl ConvertCoordinateOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"]
pub fn to_box(&mut self, val: CssBoxType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("toBox"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.to_box_shim(val);
self
}
}

View File

@@ -10,6 +10,19 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"]
pub type ConvolverOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &ConvolverOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &ConvolverOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &ConvolverOptions, val: ChannelInterpretation);
#[cfg(feature = "AudioBuffer")]
#[wasm_bindgen(method, setter = "buffer")]
fn buffer_shim(this: &ConvolverOptions, val: Option<&AudioBuffer>);
#[wasm_bindgen(method, setter = "disableNormalization")]
fn disable_normalization_shim(this: &ConvolverOptions, val: bool);
}
impl ConvolverOptions {
#[doc = "Construct a new `ConvolverOptions`."]
@@ -24,17 +37,7 @@ impl ConvolverOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +45,7 @@ impl ConvolverOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,17 +53,7 @@ impl ConvolverOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[cfg(feature = "AudioBuffer")]
@@ -78,31 +61,14 @@ impl ConvolverOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"]
pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("buffer"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.buffer_shim(val);
self
}
#[doc = "Change the `disableNormalization` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"]
pub fn disable_normalization(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("disableNormalization"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.disable_normalization_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"]
pub type CredentialCreationOptions;
#[cfg(feature = "PublicKeyCredentialCreationOptions")]
#[wasm_bindgen(method, setter = "publicKey")]
fn public_key_shim(this: &CredentialCreationOptions, val: &PublicKeyCredentialCreationOptions);
#[cfg(feature = "AbortSignal")]
#[wasm_bindgen(method, setter = "signal")]
fn signal_shim(this: &CredentialCreationOptions, val: &AbortSignal);
}
impl CredentialCreationOptions {
#[doc = "Construct a new `CredentialCreationOptions`."]
@@ -25,17 +31,7 @@ impl CredentialCreationOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"]
pub fn public_key(&mut self, val: &PublicKeyCredentialCreationOptions) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("publicKey"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.public_key_shim(val);
self
}
#[cfg(feature = "AbortSignal")]
@@ -43,14 +39,7 @@ impl CredentialCreationOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"]
pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("signal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.signal_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`*"]
pub type CredentialRequestOptions;
#[cfg(feature = "PublicKeyCredentialRequestOptions")]
#[wasm_bindgen(method, setter = "publicKey")]
fn public_key_shim(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions);
#[cfg(feature = "AbortSignal")]
#[wasm_bindgen(method, setter = "signal")]
fn signal_shim(this: &CredentialRequestOptions, val: &AbortSignal);
}
impl CredentialRequestOptions {
#[doc = "Construct a new `CredentialRequestOptions`."]
@@ -25,17 +31,7 @@ impl CredentialRequestOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"]
pub fn public_key(&mut self, val: &PublicKeyCredentialRequestOptions) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("publicKey"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.public_key_shim(val);
self
}
#[cfg(feature = "AbortSignal")]
@@ -43,14 +39,7 @@ impl CredentialRequestOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"]
pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("signal"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.signal_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKeyPair`*"]
pub type CryptoKeyPair;
#[cfg(feature = "CryptoKey")]
#[wasm_bindgen(method, setter = "privateKey")]
fn private_key_shim(this: &CryptoKeyPair, val: &CryptoKey);
#[cfg(feature = "CryptoKey")]
#[wasm_bindgen(method, setter = "publicKey")]
fn public_key_shim(this: &CryptoKeyPair, val: &CryptoKey);
}
impl CryptoKeyPair {
#[cfg(feature = "CryptoKey")]
@@ -28,17 +34,7 @@ impl CryptoKeyPair {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"]
pub fn private_key(&mut self, val: &CryptoKey) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("privateKey"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.private_key_shim(val);
self
}
#[cfg(feature = "CryptoKey")]
@@ -46,17 +42,7 @@ impl CryptoKeyPair {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"]
pub fn public_key(&mut self, val: &CryptoKey) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("publicKey"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.public_key_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"]
pub type CustomEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &CustomEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &CustomEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &CustomEventInit, val: bool);
#[wasm_bindgen(method, setter = "detail")]
fn detail_shim(this: &CustomEventInit, val: &::wasm_bindgen::JsValue);
}
impl CustomEventInit {
#[doc = "Construct a new `CustomEventInit`."]
@@ -24,65 +32,28 @@ impl CustomEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `detail` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"]
pub fn detail(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("detail"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.detail_shim(val);
self
}
}

View File

@@ -10,6 +10,16 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub type DateTimeValue;
#[wasm_bindgen(method, setter = "day")]
fn day_shim(this: &DateTimeValue, val: i32);
#[wasm_bindgen(method, setter = "hour")]
fn hour_shim(this: &DateTimeValue, val: i32);
#[wasm_bindgen(method, setter = "minute")]
fn minute_shim(this: &DateTimeValue, val: i32);
#[wasm_bindgen(method, setter = "month")]
fn month_shim(this: &DateTimeValue, val: i32);
#[wasm_bindgen(method, setter = "year")]
fn year_shim(this: &DateTimeValue, val: i32);
}
impl DateTimeValue {
#[doc = "Construct a new `DateTimeValue`."]
@@ -24,66 +34,35 @@ impl DateTimeValue {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub fn day(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("day"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.day_shim(val);
self
}
#[doc = "Change the `hour` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub fn hour(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("hour"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.hour_shim(val);
self
}
#[doc = "Change the `minute` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub fn minute(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("minute"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.minute_shim(val);
self
}
#[doc = "Change the `month` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub fn month(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("month"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.month_shim(val);
self
}
#[doc = "Change the `year` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
pub fn year(&mut self, val: i32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("year"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.year_shim(val);
self
}
}

View File

@@ -10,6 +10,21 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub type DecoderDoctorNotification;
#[wasm_bindgen(method, setter = "decodeIssue")]
fn decode_issue_shim(this: &DecoderDoctorNotification, val: &str);
#[wasm_bindgen(method, setter = "decoderDoctorReportId")]
fn decoder_doctor_report_id_shim(this: &DecoderDoctorNotification, val: &str);
#[wasm_bindgen(method, setter = "docURL")]
fn doc_url_shim(this: &DecoderDoctorNotification, val: &str);
#[wasm_bindgen(method, setter = "formats")]
fn formats_shim(this: &DecoderDoctorNotification, val: &str);
#[wasm_bindgen(method, setter = "isSolved")]
fn is_solved_shim(this: &DecoderDoctorNotification, val: bool);
#[wasm_bindgen(method, setter = "resourceURL")]
fn resource_url_shim(this: &DecoderDoctorNotification, val: &str);
#[cfg(feature = "DecoderDoctorNotificationType")]
#[wasm_bindgen(method, setter = "type")]
fn type__shim(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType);
}
impl DecoderDoctorNotification {
#[cfg(feature = "DecoderDoctorNotificationType")]
@@ -32,99 +47,42 @@ impl DecoderDoctorNotification {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn decode_issue(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("decodeIssue"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.decode_issue_shim(val);
self
}
#[doc = "Change the `decoderDoctorReportId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn decoder_doctor_report_id(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("decoderDoctorReportId"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.decoder_doctor_report_id_shim(val);
self
}
#[doc = "Change the `docURL` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn doc_url(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r =
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("docURL"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.doc_url_shim(val);
self
}
#[doc = "Change the `formats` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn formats(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("formats"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.formats_shim(val);
self
}
#[doc = "Change the `isSolved` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn is_solved(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("isSolved"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.is_solved_shim(val);
self
}
#[doc = "Change the `resourceURL` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"]
pub fn resource_url(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("resourceURL"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.resource_url_shim(val);
self
}
#[cfg(feature = "DecoderDoctorNotificationType")]
@@ -132,13 +90,7 @@ impl DecoderDoctorNotification {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"]
pub fn type_(&mut self, val: DecoderDoctorNotificationType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.type__shim(val);
self
}
}

View File

@@ -10,6 +10,18 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
pub type DelayOptions;
#[wasm_bindgen(method, setter = "channelCount")]
fn channel_count_shim(this: &DelayOptions, val: u32);
#[cfg(feature = "ChannelCountMode")]
#[wasm_bindgen(method, setter = "channelCountMode")]
fn channel_count_mode_shim(this: &DelayOptions, val: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
#[wasm_bindgen(method, setter = "channelInterpretation")]
fn channel_interpretation_shim(this: &DelayOptions, val: ChannelInterpretation);
#[wasm_bindgen(method, setter = "delayTime")]
fn delay_time_shim(this: &DelayOptions, val: f64);
#[wasm_bindgen(method, setter = "maxDelayTime")]
fn max_delay_time_shim(this: &DelayOptions, val: f64);
}
impl DelayOptions {
#[doc = "Construct a new `DelayOptions`."]
@@ -24,17 +36,7 @@ impl DelayOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
pub fn channel_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_shim(val);
self
}
#[cfg(feature = "ChannelCountMode")]
@@ -42,17 +44,7 @@ impl DelayOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"]
pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelCountMode"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_count_mode_shim(val);
self
}
#[cfg(feature = "ChannelInterpretation")]
@@ -60,51 +52,21 @@ impl DelayOptions {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"]
pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("channelInterpretation"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.channel_interpretation_shim(val);
self
}
#[doc = "Change the `delayTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
pub fn delay_time(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("delayTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.delay_time_shim(val);
self
}
#[doc = "Change the `maxDelayTime` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
pub fn max_delay_time(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("maxDelayTime"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.max_delay_time_shim(val);
self
}
}

View File

@@ -10,6 +10,12 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"]
pub type DeviceAccelerationInit;
#[wasm_bindgen(method, setter = "x")]
fn x_shim(this: &DeviceAccelerationInit, val: Option<f64>);
#[wasm_bindgen(method, setter = "y")]
fn y_shim(this: &DeviceAccelerationInit, val: Option<f64>);
#[wasm_bindgen(method, setter = "z")]
fn z_shim(this: &DeviceAccelerationInit, val: Option<f64>);
}
impl DeviceAccelerationInit {
#[doc = "Construct a new `DeviceAccelerationInit`."]
@@ -24,39 +30,21 @@ impl DeviceAccelerationInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"]
pub fn x(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("x"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.x_shim(val);
self
}
#[doc = "Change the `y` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"]
pub fn y(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("y"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.y_shim(val);
self
}
#[doc = "Change the `z` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"]
pub fn z(&mut self, val: Option<f64>) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("z"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.z_shim(val);
self
}
}

View File

@@ -10,6 +10,14 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"]
pub type DeviceLightEventInit;
#[wasm_bindgen(method, setter = "bubbles")]
fn bubbles_shim(this: &DeviceLightEventInit, val: bool);
#[wasm_bindgen(method, setter = "cancelable")]
fn cancelable_shim(this: &DeviceLightEventInit, val: bool);
#[wasm_bindgen(method, setter = "composed")]
fn composed_shim(this: &DeviceLightEventInit, val: bool);
#[wasm_bindgen(method, setter = "value")]
fn value_shim(this: &DeviceLightEventInit, val: f64);
}
impl DeviceLightEventInit {
#[doc = "Construct a new `DeviceLightEventInit`."]
@@ -24,64 +32,28 @@ impl DeviceLightEventInit {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bubbles"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.bubbles_shim(val);
self
}
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("cancelable"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.cancelable_shim(val);
self
}
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"]
pub fn composed(&mut self, val: bool) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("composed"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.composed_shim(val);
self
}
#[doc = "Change the `value` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"]
pub fn value(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self.value_shim(val);
self
}
}

Some files were not shown because too many files have changed in this diff Show More