Dramatically improving the build time of web-sys (#2012)

* Pre-generating web-sys

* Fixing build errors

* Minor refactor for the unit tests

* Changing to generate #[wasm_bindgen} annotations

* Fixing code generation

* Adding in main bin to wasm-bindgen-webidl

* Fixing more problems

* Adding in support for unstable APIs

* Fixing bug with code generation

* More code generation fixes

* Improving the webidl program

* Removing unnecessary cfg from the generated code

* Splitting doc comments onto separate lines

* Improving the generation for unstable features

* Adding in support for string values in enums

* Now runs rustfmt on the mod.rs file

* Fixing codegen for constructors

* Fixing webidl-tests

* Fixing build errors

* Another fix for build errors

* Renaming typescript_name to typescript_type

* Adding in docs for typescript_type

* Adding in CI script to verify that web-sys is up to date

* Fixing CI script

* Fixing CI script

* Don't suppress git diff output

* Remove duplicate definitions of `Location`

Looks to be a preexisting bug in wasm-bindgen?

* Regenerate webidl

* Try to get the git diff command right

* Handle named constructors in WebIDL

* Remove stray rustfmt.toml

* Add back NamedConstructorBar definition in tests

* Run stable rustfmt over everything

* Don't run Cargo in a build script

Instead refactor things so webidl-tests can use the Rust-code-generation
as a library in a build script. Also fixes `cargo fmt` in the
repository.

* Fixup generated code

* Running web-sys checks on stable

* Improving the code generation a little

* Running rustfmt

Co-authored-by: Alex Crichton <alex@alexcrichton.com>
This commit is contained in:
Pauan
2020-03-03 00:39:36 +01:00
committed by GitHub
parent eb04cf2dda
commit 3f4acc453b
1344 changed files with 142082 additions and 2883 deletions

View File

@ -0,0 +1,36 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AbortController , typescript_type = "AbortController" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AbortController` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortController`*"]
pub type AbortController;
#[cfg(feature = "AbortSignal")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AbortController" , js_name = signal ) ]
#[doc = "Getter for the `signal` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/signal)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortController`, `AbortSignal`*"]
pub fn signal(this: &AbortController) -> AbortSignal;
#[wasm_bindgen(catch, constructor, js_class = "AbortController")]
#[doc = "The `new AbortController(..)` constructor, creating a new instance of `AbortController`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/AbortController)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortController`*"]
pub fn new() -> Result<AbortController, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "AbortController" , js_name = abort ) ]
#[doc = "The `abort()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortController`*"]
pub fn abort(this: &AbortController);
}

View File

@ -0,0 +1,35 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = AbortSignal , typescript_type = "AbortSignal" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AbortSignal` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
pub type AbortSignal;
# [ wasm_bindgen ( structural , method , getter , js_class = "AbortSignal" , js_name = aborted ) ]
#[doc = "Getter for the `aborted` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/aborted)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
pub fn aborted(this: &AbortSignal) -> bool;
# [ wasm_bindgen ( structural , method , getter , js_class = "AbortSignal" , js_name = onabort ) ]
#[doc = "Getter for the `onabort` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/onabort)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
pub fn onabort(this: &AbortSignal) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AbortSignal" , js_name = onabort ) ]
#[doc = "Setter for the `onabort` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/onabort)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
pub fn set_onabort(this: &AbortSignal, value: Option<&::js_sys::Function>);
}

View File

@ -0,0 +1,69 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AddEventListenerOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AddEventListenerOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub type AddEventListenerOptions;
}
impl AddEventListenerOptions {
#[doc = "Construct a new `AddEventListenerOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `capture` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"]
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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,50 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesCbcParams ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesCbcParams` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
pub type AesCbcParams;
}
impl AesCbcParams {
#[doc = "Construct a new `AesCbcParams`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
pub fn new(name: &str, iv: &::js_sys::Object) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.iv(iv);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,69 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesCtrParams ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesCtrParams` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub type AesCtrParams;
}
impl AesCtrParams {
#[doc = "Construct a new `AesCtrParams`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
pub fn new(name: &str, counter: &::js_sys::Object, length: u8) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.counter(counter);
ret.length(length);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,51 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesDerivedKeyParams ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesDerivedKeyParams` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
pub type AesDerivedKeyParams;
}
impl AesDerivedKeyParams {
#[doc = "Construct a new `AesDerivedKeyParams`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
pub fn new(name: &str, length: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,84 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesGcmParams ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesGcmParams` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub type AesGcmParams;
}
impl AesGcmParams {
#[doc = "Construct a new `AesGcmParams`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
pub fn new(name: &str, iv: &::js_sys::Object) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.iv(iv);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,51 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesKeyAlgorithm ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesKeyAlgorithm` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
pub type AesKeyAlgorithm;
}
impl AesKeyAlgorithm {
#[doc = "Construct a new `AesKeyAlgorithm`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
pub fn new(name: &str, length: u16) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,51 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AesKeyGenParams ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AesKeyGenParams` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
pub type AesKeyGenParams;
}
impl AesKeyGenParams {
#[doc = "Construct a new `AesKeyGenParams`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
pub fn new(name: &str, length: u16) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.length(length);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,36 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = Algorithm ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Algorithm` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"]
pub type Algorithm;
}
impl Algorithm {
#[doc = "Construct a new `Algorithm`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"]
pub fn new(name: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"]
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
}
}

View File

@ -0,0 +1,14 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AlignSetting` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AlignSetting`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AlignSetting {
Start = "start",
Center = "center",
End = "end",
Left = "left",
Right = "right",
}

View File

@ -0,0 +1,124 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AnalyserNode , typescript_type = "AnalyserNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnalyserNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub type AnalyserNode;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnalyserNode" , js_name = fftSize ) ]
#[doc = "Getter for the `fftSize` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn fft_size(this: &AnalyserNode) -> u32;
# [ wasm_bindgen ( structural , method , setter , js_class = "AnalyserNode" , js_name = fftSize ) ]
#[doc = "Setter for the `fftSize` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn set_fft_size(this: &AnalyserNode, value: u32);
# [ wasm_bindgen ( structural , method , getter , js_class = "AnalyserNode" , js_name = frequencyBinCount ) ]
#[doc = "Getter for the `frequencyBinCount` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn frequency_bin_count(this: &AnalyserNode) -> u32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnalyserNode" , js_name = minDecibels ) ]
#[doc = "Getter for the `minDecibels` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/minDecibels)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn min_decibels(this: &AnalyserNode) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AnalyserNode" , js_name = minDecibels ) ]
#[doc = "Setter for the `minDecibels` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/minDecibels)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn set_min_decibels(this: &AnalyserNode, value: f64);
# [ wasm_bindgen ( structural , method , getter , js_class = "AnalyserNode" , js_name = maxDecibels ) ]
#[doc = "Getter for the `maxDecibels` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/maxDecibels)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn max_decibels(this: &AnalyserNode) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AnalyserNode" , js_name = maxDecibels ) ]
#[doc = "Setter for the `maxDecibels` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/maxDecibels)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn set_max_decibels(this: &AnalyserNode, value: f64);
# [ wasm_bindgen ( structural , method , getter , js_class = "AnalyserNode" , js_name = smoothingTimeConstant ) ]
#[doc = "Getter for the `smoothingTimeConstant` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/smoothingTimeConstant)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn smoothing_time_constant(this: &AnalyserNode) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AnalyserNode" , js_name = smoothingTimeConstant ) ]
#[doc = "Setter for the `smoothingTimeConstant` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/smoothingTimeConstant)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn set_smoothing_time_constant(this: &AnalyserNode, value: f64);
#[cfg(feature = "BaseAudioContext")]
#[wasm_bindgen(catch, constructor, js_class = "AnalyserNode")]
#[doc = "The `new AnalyserNode(..)` constructor, creating a new instance of `AnalyserNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/AnalyserNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `BaseAudioContext`*"]
pub fn new(context: &BaseAudioContext) -> Result<AnalyserNode, JsValue>;
#[cfg(all(feature = "AnalyserOptions", feature = "BaseAudioContext",))]
#[wasm_bindgen(catch, constructor, js_class = "AnalyserNode")]
#[doc = "The `new AnalyserNode(..)` constructor, creating a new instance of `AnalyserNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/AnalyserNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `AnalyserOptions`, `BaseAudioContext`*"]
pub fn new_with_options(
context: &BaseAudioContext,
options: &AnalyserOptions,
) -> Result<AnalyserNode, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "AnalyserNode" , js_name = getByteFrequencyData ) ]
#[doc = "The `getByteFrequencyData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn get_byte_frequency_data(this: &AnalyserNode, array: &mut [u8]);
# [ wasm_bindgen ( method , structural , js_class = "AnalyserNode" , js_name = getByteTimeDomainData ) ]
#[doc = "The `getByteTimeDomainData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteTimeDomainData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn get_byte_time_domain_data(this: &AnalyserNode, array: &mut [u8]);
# [ wasm_bindgen ( method , structural , js_class = "AnalyserNode" , js_name = getFloatFrequencyData ) ]
#[doc = "The `getFloatFrequencyData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatFrequencyData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn get_float_frequency_data(this: &AnalyserNode, array: &mut [f32]);
# [ wasm_bindgen ( method , structural , js_class = "AnalyserNode" , js_name = getFloatTimeDomainData ) ]
#[doc = "The `getFloatTimeDomainData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatTimeDomainData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
pub fn get_float_time_domain_data(this: &AnalyserNode, array: &mut [f32]);
}

View File

@ -0,0 +1,143 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnalyserOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnalyserOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub type AnalyserOptions;
}
impl AnalyserOptions {
#[doc = "Construct a new `AnalyserOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `channelCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"]
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
}
#[cfg(feature = "ChannelCountMode")]
#[doc = "Change the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"]
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
}
#[cfg(feature = "ChannelInterpretation")]
#[doc = "Change the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,68 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( is_type_of = | _ | false , extends = :: js_sys :: Object , js_name = ANGLE_instanced_arrays , typescript_type = "ANGLE_instanced_arrays" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AngleInstancedArrays` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub type AngleInstancedArrays;
# [ wasm_bindgen ( method , structural , js_class = "ANGLE_instanced_arrays" , js_name = drawArraysInstancedANGLE ) ]
#[doc = "The `drawArraysInstancedANGLE()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/drawArraysInstancedANGLE)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub fn draw_arrays_instanced_angle(
this: &AngleInstancedArrays,
mode: u32,
first: i32,
count: i32,
primcount: i32,
);
# [ wasm_bindgen ( method , structural , js_class = "ANGLE_instanced_arrays" , js_name = drawElementsInstancedANGLE ) ]
#[doc = "The `drawElementsInstancedANGLE()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub fn draw_elements_instanced_angle_with_i32(
this: &AngleInstancedArrays,
mode: u32,
count: i32,
type_: u32,
offset: i32,
primcount: i32,
);
# [ wasm_bindgen ( method , structural , js_class = "ANGLE_instanced_arrays" , js_name = drawElementsInstancedANGLE ) ]
#[doc = "The `drawElementsInstancedANGLE()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub fn draw_elements_instanced_angle_with_f64(
this: &AngleInstancedArrays,
mode: u32,
count: i32,
type_: u32,
offset: f64,
primcount: i32,
);
# [ wasm_bindgen ( method , structural , js_class = "ANGLE_instanced_arrays" , js_name = vertexAttribDivisorANGLE ) ]
#[doc = "The `vertexAttribDivisorANGLE()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub fn vertex_attrib_divisor_angle(this: &AngleInstancedArrays, index: u32, divisor: u32);
}
impl AngleInstancedArrays {
#[doc = "The `ANGLE_instanced_arrays.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE` const."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AngleInstancedArrays`*"]
pub const VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: u32 = 35070u64 as u32;
}

View File

@ -0,0 +1,227 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = Animation , typescript_type = "Animation" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Animation` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub type Animation;
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = id ) ]
#[doc = "Getter for the `id` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/id)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn id(this: &Animation) -> String;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = id ) ]
#[doc = "Setter for the `id` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/id)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_id(this: &Animation, value: &str);
#[cfg(feature = "AnimationEffect")]
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = effect ) ]
#[doc = "Getter for the `effect` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
pub fn effect(this: &Animation) -> Option<AnimationEffect>;
#[cfg(feature = "AnimationEffect")]
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = effect ) ]
#[doc = "Setter for the `effect` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
pub fn set_effect(this: &Animation, value: Option<&AnimationEffect>);
#[cfg(feature = "AnimationTimeline")]
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = timeline ) ]
#[doc = "Getter for the `timeline` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/timeline)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationTimeline`*"]
pub fn timeline(this: &Animation) -> Option<AnimationTimeline>;
#[cfg(feature = "AnimationTimeline")]
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = timeline ) ]
#[doc = "Setter for the `timeline` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/timeline)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationTimeline`*"]
pub fn set_timeline(this: &Animation, value: Option<&AnimationTimeline>);
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = startTime ) ]
#[doc = "Getter for the `startTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/startTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn start_time(this: &Animation) -> Option<f64>;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = startTime ) ]
#[doc = "Setter for the `startTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/startTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_start_time(this: &Animation, value: Option<f64>);
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn current_time(this: &Animation) -> Option<f64>;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = currentTime ) ]
#[doc = "Setter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_current_time(this: &Animation, value: Option<f64>);
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = playbackRate ) ]
#[doc = "Getter for the `playbackRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playbackRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn playback_rate(this: &Animation) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = playbackRate ) ]
#[doc = "Setter for the `playbackRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playbackRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_playback_rate(this: &Animation, value: f64);
#[cfg(feature = "AnimationPlayState")]
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = playState ) ]
#[doc = "Getter for the `playState` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playState)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationPlayState`*"]
pub fn play_state(this: &Animation) -> AnimationPlayState;
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = pending ) ]
#[doc = "Getter for the `pending` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/pending)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn pending(this: &Animation) -> bool;
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "Animation" , js_name = ready ) ]
#[doc = "Getter for the `ready` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/ready)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn ready(this: &Animation) -> Result<::js_sys::Promise, JsValue>;
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "Animation" , js_name = finished ) ]
#[doc = "Getter for the `finished` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/finished)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn finished(this: &Animation) -> Result<::js_sys::Promise, JsValue>;
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = onfinish ) ]
#[doc = "Getter for the `onfinish` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/onfinish)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn onfinish(this: &Animation) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = onfinish ) ]
#[doc = "Setter for the `onfinish` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/onfinish)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_onfinish(this: &Animation, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "Animation" , js_name = oncancel ) ]
#[doc = "Getter for the `oncancel` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/oncancel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn oncancel(this: &Animation) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "Animation" , js_name = oncancel ) ]
#[doc = "Setter for the `oncancel` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/oncancel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn set_oncancel(this: &Animation, value: Option<&::js_sys::Function>);
#[wasm_bindgen(catch, constructor, js_class = "Animation")]
#[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn new() -> Result<Animation, JsValue>;
#[cfg(feature = "AnimationEffect")]
#[wasm_bindgen(catch, constructor, js_class = "Animation")]
#[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
pub fn new_with_effect(effect: Option<&AnimationEffect>) -> Result<Animation, JsValue>;
#[cfg(all(feature = "AnimationEffect", feature = "AnimationTimeline",))]
#[wasm_bindgen(catch, constructor, js_class = "Animation")]
#[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`, `AnimationTimeline`*"]
pub fn new_with_effect_and_timeline(
effect: Option<&AnimationEffect>,
timeline: Option<&AnimationTimeline>,
) -> Result<Animation, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "Animation" , js_name = cancel ) ]
#[doc = "The `cancel()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/cancel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn cancel(this: &Animation);
# [ wasm_bindgen ( catch , method , structural , js_class = "Animation" , js_name = finish ) ]
#[doc = "The `finish()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/finish)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn finish(this: &Animation) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Animation" , js_name = pause ) ]
#[doc = "The `pause()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/pause)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn pause(this: &Animation) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Animation" , js_name = play ) ]
#[doc = "The `play()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/play)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn play(this: &Animation) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Animation" , js_name = reverse ) ]
#[doc = "The `reverse()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/reverse)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn reverse(this: &Animation) -> Result<(), JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "Animation" , js_name = updatePlaybackRate ) ]
#[doc = "The `updatePlaybackRate()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/updatePlaybackRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Animation`*"]
pub fn update_playback_rate(this: &Animation, playback_rate: f64);
}

View File

@ -0,0 +1,48 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationEffect , typescript_type = "AnimationEffect" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationEffect` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEffect`*"]
pub type AnimationEffect;
#[cfg(feature = "ComputedEffectTiming")]
# [ wasm_bindgen ( method , structural , js_class = "AnimationEffect" , js_name = getComputedTiming ) ]
#[doc = "The `getComputedTiming()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getComputedTiming)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEffect`, `ComputedEffectTiming`*"]
pub fn get_computed_timing(this: &AnimationEffect) -> ComputedEffectTiming;
#[cfg(feature = "EffectTiming")]
# [ wasm_bindgen ( method , structural , js_class = "AnimationEffect" , js_name = getTiming ) ]
#[doc = "The `getTiming()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getTiming)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEffect`, `EffectTiming`*"]
pub fn get_timing(this: &AnimationEffect) -> EffectTiming;
# [ wasm_bindgen ( catch , method , structural , js_class = "AnimationEffect" , js_name = updateTiming ) ]
#[doc = "The `updateTiming()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/updateTiming)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEffect`*"]
pub fn update_timing(this: &AnimationEffect) -> Result<(), JsValue>;
#[cfg(feature = "OptionalEffectTiming")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AnimationEffect" , js_name = updateTiming ) ]
#[doc = "The `updateTiming()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/updateTiming)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEffect`, `OptionalEffectTiming`*"]
pub fn update_timing_with_timing(
this: &AnimationEffect,
timing: &OptionalEffectTiming,
) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,53 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Event , extends = :: js_sys :: Object , js_name = AnimationEvent , typescript_type = "AnimationEvent" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`*"]
pub type AnimationEvent;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationEvent" , js_name = animationName ) ]
#[doc = "Getter for the `animationName` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/animationName)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`*"]
pub fn animation_name(this: &AnimationEvent) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationEvent" , js_name = elapsedTime ) ]
#[doc = "Getter for the `elapsedTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/elapsedTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`*"]
pub fn elapsed_time(this: &AnimationEvent) -> f32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationEvent" , js_name = pseudoElement ) ]
#[doc = "Getter for the `pseudoElement` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/pseudoElement)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`*"]
pub fn pseudo_element(this: &AnimationEvent) -> String;
#[wasm_bindgen(catch, constructor, js_class = "AnimationEvent")]
#[doc = "The `new AnimationEvent(..)` constructor, creating a new instance of `AnimationEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/AnimationEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`*"]
pub fn new(type_: &str) -> Result<AnimationEvent, JsValue>;
#[cfg(feature = "AnimationEventInit")]
#[wasm_bindgen(catch, constructor, js_class = "AnimationEvent")]
#[doc = "The `new AnimationEvent(..)` constructor, creating a new instance of `AnimationEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/AnimationEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEvent`, `AnimationEventInit`*"]
pub fn new_with_event_init_dict(
type_: &str,
event_init_dict: &AnimationEventInit,
) -> Result<AnimationEvent, JsValue>;
}

View File

@ -0,0 +1,124 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationEventInit ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub type AnimationEventInit;
}
impl AnimationEventInit {
#[doc = "Construct a new `AnimationEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,13 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AnimationPlayState` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlayState`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AnimationPlayState {
Idle = "idle",
Running = "running",
Paused = "paused",
Finished = "finished",
}

View File

@ -0,0 +1,46 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Event , extends = :: js_sys :: Object , js_name = AnimationPlaybackEvent , typescript_type = "AnimationPlaybackEvent" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationPlaybackEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEvent`*"]
pub type AnimationPlaybackEvent;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationPlaybackEvent" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEvent`*"]
pub fn current_time(this: &AnimationPlaybackEvent) -> Option<f64>;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationPlaybackEvent" , js_name = timelineTime ) ]
#[doc = "Getter for the `timelineTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent/timelineTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEvent`*"]
pub fn timeline_time(this: &AnimationPlaybackEvent) -> Option<f64>;
#[wasm_bindgen(catch, constructor, js_class = "AnimationPlaybackEvent")]
#[doc = "The `new AnimationPlaybackEvent(..)` constructor, creating a new instance of `AnimationPlaybackEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent/AnimationPlaybackEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEvent`*"]
pub fn new(type_: &str) -> Result<AnimationPlaybackEvent, JsValue>;
#[cfg(feature = "AnimationPlaybackEventInit")]
#[wasm_bindgen(catch, constructor, js_class = "AnimationPlaybackEvent")]
#[doc = "The `new AnimationPlaybackEvent(..)` constructor, creating a new instance of `AnimationPlaybackEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent/AnimationPlaybackEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEvent`, `AnimationPlaybackEventInit`*"]
pub fn new_with_event_init_dict(
type_: &str,
event_init_dict: &AnimationPlaybackEventInit,
) -> Result<AnimationPlaybackEvent, JsValue>;
}

View File

@ -0,0 +1,107 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationPlaybackEventInit ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationPlaybackEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub type AnimationPlaybackEventInit;
}
impl AnimationPlaybackEventInit {
#[doc = "Construct a new `AnimationPlaybackEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,94 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationPropertyDetails ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationPropertyDetails` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub type AnimationPropertyDetails;
}
impl AnimationPropertyDetails {
#[doc = "Construct a new `AnimationPropertyDetails`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
pub fn new(
property: &str,
running_on_compositor: bool,
values: &::wasm_bindgen::JsValue,
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.property(property);
ret.running_on_compositor(running_on_compositor);
ret.values(values);
ret
}
#[doc = "Change the `property` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,84 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationPropertyValueDetails ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationPropertyValueDetails` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
pub type AnimationPropertyValueDetails;
}
impl AnimationPropertyValueDetails {
#[cfg(feature = "CompositeOperation")]
#[doc = "Construct a new `AnimationPropertyValueDetails`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
pub fn new(composite: CompositeOperation, offset: f64) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.composite(composite);
ret.offset(offset);
ret
}
#[cfg(feature = "CompositeOperation")]
#[doc = "Change the `composite` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,21 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AnimationTimeline , typescript_type = "AnimationTimeline" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AnimationTimeline` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationTimeline)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`*"]
pub type AnimationTimeline;
# [ wasm_bindgen ( structural , method , getter , js_class = "AnimationTimeline" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnimationTimeline/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`*"]
pub fn current_time(this: &AnimationTimeline) -> Option<f64>;
}

View File

@ -0,0 +1,39 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AssignedNodesOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AssignedNodesOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"]
pub type AssignedNodesOptions;
}
impl AssignedNodesOptions {
#[doc = "Construct a new `AssignedNodesOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `flatten` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"]
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
}
}

View File

@ -0,0 +1,12 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AttestationConveyancePreference` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AttestationConveyancePreference {
None = "none",
Indirect = "indirect",
Direct = "direct",
}

View File

@ -0,0 +1,63 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = Attr , typescript_type = "Attr" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Attr` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub type Attr;
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = localName ) ]
#[doc = "Getter for the `localName` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/localName)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn local_name(this: &Attr) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = value ) ]
#[doc = "Getter for the `value` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/value)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn value(this: &Attr) -> String;
# [ wasm_bindgen ( structural , method , setter , js_class = "Attr" , js_name = value ) ]
#[doc = "Setter for the `value` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/value)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn set_value(this: &Attr, value: &str);
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = name ) ]
#[doc = "Getter for the `name` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/name)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn name(this: &Attr) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = namespaceURI ) ]
#[doc = "Getter for the `namespaceURI` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/namespaceURI)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn namespace_uri(this: &Attr) -> Option<String>;
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = prefix ) ]
#[doc = "Getter for the `prefix` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/prefix)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn prefix(this: &Attr) -> Option<String>;
# [ wasm_bindgen ( structural , method , getter , js_class = "Attr" , js_name = specified ) ]
#[doc = "Getter for the `specified` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Attr/specified)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Attr`*"]
pub fn specified(this: &Attr) -> bool;
}

View File

@ -0,0 +1,50 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AttributeNameValue ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AttributeNameValue` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
pub type AttributeNameValue;
}
impl AttributeNameValue {
#[doc = "Construct a new `AttributeNameValue`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
pub fn new(name: &str, value: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.name(name);
ret.value(value);
ret
}
#[doc = "Change the `name` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,103 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioBuffer , typescript_type = "AudioBuffer" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioBuffer` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub type AudioBuffer;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBuffer" , js_name = sampleRate ) ]
#[doc = "Getter for the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/sampleRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn sample_rate(this: &AudioBuffer) -> f32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBuffer" , js_name = length ) ]
#[doc = "Getter for the `length` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/length)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn length(this: &AudioBuffer) -> u32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBuffer" , js_name = duration ) ]
#[doc = "Getter for the `duration` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/duration)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn duration(this: &AudioBuffer) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBuffer" , js_name = numberOfChannels ) ]
#[doc = "Getter for the `numberOfChannels` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/numberOfChannels)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn number_of_channels(this: &AudioBuffer) -> u32;
#[cfg(feature = "AudioBufferOptions")]
#[wasm_bindgen(catch, constructor, js_class = "AudioBuffer")]
#[doc = "The `new AudioBuffer(..)` constructor, creating a new instance of `AudioBuffer`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/AudioBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferOptions`*"]
pub fn new(options: &AudioBufferOptions) -> Result<AudioBuffer, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBuffer" , js_name = copyFromChannel ) ]
#[doc = "The `copyFromChannel()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyFromChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn copy_from_channel(
this: &AudioBuffer,
destination: &mut [f32],
channel_number: i32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBuffer" , js_name = copyFromChannel ) ]
#[doc = "The `copyFromChannel()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyFromChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn copy_from_channel_with_start_in_channel(
this: &AudioBuffer,
destination: &mut [f32],
channel_number: i32,
start_in_channel: u32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel ) ]
#[doc = "The `copyToChannel()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyToChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn copy_to_channel(
this: &AudioBuffer,
source: &mut [f32],
channel_number: i32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel ) ]
#[doc = "The `copyToChannel()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyToChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn copy_to_channel_with_start_in_channel(
this: &AudioBuffer,
source: &mut [f32],
channel_number: i32,
start_in_channel: u32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBuffer" , js_name = getChannelData ) ]
#[doc = "The `getChannelData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/getChannelData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
pub fn get_channel_data(this: &AudioBuffer, channel: u32) -> Result<Vec<f32>, JsValue>;
}

View File

@ -0,0 +1,72 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioBufferOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioBufferOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub type AudioBufferOptions;
}
impl AudioBufferOptions {
#[doc = "Construct a new `AudioBufferOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
pub fn new(length: u32, sample_rate: f32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.length(length);
ret.sample_rate(sample_rate);
ret
}
#[doc = "Change the `length` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"]
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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,172 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioScheduledSourceNode , extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioBufferSourceNode , typescript_type = "AudioBufferSourceNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioBufferSourceNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub type AudioBufferSourceNode;
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = buffer ) ]
#[doc = "Getter for the `buffer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/buffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceNode`*"]
pub fn buffer(this: &AudioBufferSourceNode) -> Option<AudioBuffer>;
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = buffer ) ]
#[doc = "Setter for the `buffer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/buffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceNode`*"]
pub fn set_buffer(this: &AudioBufferSourceNode, value: Option<&AudioBuffer>);
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = playbackRate ) ]
#[doc = "Getter for the `playbackRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/playbackRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioParam`*"]
pub fn playback_rate(this: &AudioBufferSourceNode) -> AudioParam;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = detune ) ]
#[doc = "Getter for the `detune` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/detune)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioParam`*"]
pub fn detune(this: &AudioBufferSourceNode) -> AudioParam;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loop ) ]
#[doc = "Getter for the `loop` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn loop_(this: &AudioBufferSourceNode) -> bool;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loop ) ]
#[doc = "Setter for the `loop` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn set_loop(this: &AudioBufferSourceNode, value: bool);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loopStart ) ]
#[doc = "Getter for the `loopStart` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopStart)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn loop_start(this: &AudioBufferSourceNode) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loopStart ) ]
#[doc = "Setter for the `loopStart` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopStart)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn set_loop_start(this: &AudioBufferSourceNode, value: f64);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loopEnd ) ]
#[doc = "Getter for the `loopEnd` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopEnd)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn loop_end(this: &AudioBufferSourceNode) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loopEnd ) ]
#[doc = "Setter for the `loopEnd` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopEnd)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn set_loop_end(this: &AudioBufferSourceNode, value: f64);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = onended ) ]
#[doc = "Getter for the `onended` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/onended)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn onended(this: &AudioBufferSourceNode) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = onended ) ]
#[doc = "Setter for the `onended` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/onended)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn set_onended(this: &AudioBufferSourceNode, value: Option<&::js_sys::Function>);
#[cfg(feature = "BaseAudioContext")]
#[wasm_bindgen(catch, constructor, js_class = "AudioBufferSourceNode")]
#[doc = "The `new AudioBufferSourceNode(..)` constructor, creating a new instance of `AudioBufferSourceNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/AudioBufferSourceNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `BaseAudioContext`*"]
pub fn new(context: &BaseAudioContext) -> Result<AudioBufferSourceNode, JsValue>;
#[cfg(all(feature = "AudioBufferSourceOptions", feature = "BaseAudioContext",))]
#[wasm_bindgen(catch, constructor, js_class = "AudioBufferSourceNode")]
#[doc = "The `new AudioBufferSourceNode(..)` constructor, creating a new instance of `AudioBufferSourceNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/AudioBufferSourceNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioBufferSourceOptions`, `BaseAudioContext`*"]
pub fn new_with_options(
context: &BaseAudioContext,
options: &AudioBufferSourceOptions,
) -> Result<AudioBufferSourceNode, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn start(this: &AudioBufferSourceNode) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn start_with_when(this: &AudioBufferSourceNode, when: f64) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn start_with_when_and_grain_offset(
this: &AudioBufferSourceNode,
when: f64,
grain_offset: f64,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn start_with_when_and_grain_offset_and_grain_duration(
this: &AudioBufferSourceNode,
when: f64,
grain_offset: f64,
grain_duration: f64,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = stop ) ]
#[doc = "The `stop()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/stop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn stop(this: &AudioBufferSourceNode) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = stop ) ]
#[doc = "The `stop()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/stop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"]
pub fn stop_with_when(this: &AudioBufferSourceNode, when: f64) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,115 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioBufferSourceOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioBufferSourceOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub type AudioBufferSourceOptions;
}
impl AudioBufferSourceOptions {
#[doc = "Construct a new `AudioBufferSourceOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "AudioBuffer")]
#[doc = "Change the `buffer` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,90 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioConfiguration ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioConfiguration` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub type AudioConfiguration;
}
impl AudioConfiguration {
#[doc = "Construct a new `AudioConfiguration`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `bitrate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,418 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( vendor_prefix = webkit , extends = BaseAudioContext , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioContext , typescript_type = "AudioContext" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioContext` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub type AudioContext;
#[cfg(feature = "AudioDestinationNode")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = destination ) ]
#[doc = "Getter for the `destination` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/destination)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioDestinationNode`*"]
pub fn destination(this: &AudioContext) -> AudioDestinationNode;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = sampleRate ) ]
#[doc = "Getter for the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/sampleRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn sample_rate(this: &AudioContext) -> f32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn current_time(this: &AudioContext) -> f64;
#[cfg(feature = "AudioListener")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = listener ) ]
#[doc = "Getter for the `listener` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/listener)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioListener`*"]
pub fn listener(this: &AudioContext) -> AudioListener;
#[cfg(feature = "AudioContextState")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = state ) ]
#[doc = "Getter for the `state` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/state)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioContextState`*"]
pub fn state(this: &AudioContext) -> AudioContextState;
#[cfg(feature = "AudioWorklet")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioContext" , js_name = audioWorklet ) ]
#[doc = "Getter for the `audioWorklet` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/audioWorklet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioWorklet`*"]
pub fn audio_worklet(this: &AudioContext) -> Result<AudioWorklet, JsValue>;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioContext" , js_name = onstatechange ) ]
#[doc = "Getter for the `onstatechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onstatechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn onstatechange(this: &AudioContext) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioContext" , js_name = onstatechange ) ]
#[doc = "Setter for the `onstatechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onstatechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn set_onstatechange(this: &AudioContext, value: Option<&::js_sys::Function>);
#[wasm_bindgen(catch, constructor, js_class = "AudioContext")]
#[doc = "The `new AudioContext(..)` constructor, creating a new instance of `AudioContext`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn new() -> Result<AudioContext, JsValue>;
#[cfg(feature = "AudioContextOptions")]
#[wasm_bindgen(catch, constructor, js_class = "AudioContext")]
#[doc = "The `new AudioContext(..)` constructor, creating a new instance of `AudioContext`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioContextOptions`*"]
pub fn new_with_context_options(
context_options: &AudioContextOptions,
) -> Result<AudioContext, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = close ) ]
#[doc = "The `close()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/close)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn close(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>;
#[cfg(all(feature = "HtmlMediaElement", feature = "MediaElementAudioSourceNode",))]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createMediaElementSource ) ]
#[doc = "The `createMediaElementSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaElementSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `HtmlMediaElement`, `MediaElementAudioSourceNode`*"]
pub fn create_media_element_source(
this: &AudioContext,
media_element: &HtmlMediaElement,
) -> Result<MediaElementAudioSourceNode, JsValue>;
#[cfg(feature = "MediaStreamAudioDestinationNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createMediaStreamDestination ) ]
#[doc = "The `createMediaStreamDestination()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamDestination)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `MediaStreamAudioDestinationNode`*"]
pub fn create_media_stream_destination(
this: &AudioContext,
) -> Result<MediaStreamAudioDestinationNode, JsValue>;
#[cfg(all(feature = "MediaStream", feature = "MediaStreamAudioSourceNode",))]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createMediaStreamSource ) ]
#[doc = "The `createMediaStreamSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `MediaStream`, `MediaStreamAudioSourceNode`*"]
pub fn create_media_stream_source(
this: &AudioContext,
media_stream: &MediaStream,
) -> Result<MediaStreamAudioSourceNode, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = suspend ) ]
#[doc = "The `suspend()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/suspend)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn suspend(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>;
#[cfg(feature = "AnalyserNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createAnalyser ) ]
#[doc = "The `createAnalyser()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createAnalyser)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `AudioContext`*"]
pub fn create_analyser(this: &AudioContext) -> Result<AnalyserNode, JsValue>;
#[cfg(feature = "BiquadFilterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createBiquadFilter ) ]
#[doc = "The `createBiquadFilter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBiquadFilter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `BiquadFilterNode`*"]
pub fn create_biquad_filter(this: &AudioContext) -> Result<BiquadFilterNode, JsValue>;
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createBuffer ) ]
#[doc = "The `createBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioContext`*"]
pub fn create_buffer(
this: &AudioContext,
number_of_channels: u32,
length: u32,
sample_rate: f32,
) -> Result<AudioBuffer, JsValue>;
#[cfg(feature = "AudioBufferSourceNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createBufferSource ) ]
#[doc = "The `createBufferSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioContext`*"]
pub fn create_buffer_source(this: &AudioContext) -> Result<AudioBufferSourceNode, JsValue>;
#[cfg(feature = "ChannelMergerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createChannelMerger ) ]
#[doc = "The `createChannelMerger()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelMerger)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelMergerNode`*"]
pub fn create_channel_merger(this: &AudioContext) -> Result<ChannelMergerNode, JsValue>;
#[cfg(feature = "ChannelMergerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createChannelMerger ) ]
#[doc = "The `createChannelMerger()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelMerger)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelMergerNode`*"]
pub fn create_channel_merger_with_number_of_inputs(
this: &AudioContext,
number_of_inputs: u32,
) -> Result<ChannelMergerNode, JsValue>;
#[cfg(feature = "ChannelSplitterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createChannelSplitter ) ]
#[doc = "The `createChannelSplitter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelSplitter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelSplitterNode`*"]
pub fn create_channel_splitter(this: &AudioContext) -> Result<ChannelSplitterNode, JsValue>;
#[cfg(feature = "ChannelSplitterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createChannelSplitter ) ]
#[doc = "The `createChannelSplitter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelSplitter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelSplitterNode`*"]
pub fn create_channel_splitter_with_number_of_outputs(
this: &AudioContext,
number_of_outputs: u32,
) -> Result<ChannelSplitterNode, JsValue>;
#[cfg(feature = "ConstantSourceNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createConstantSource ) ]
#[doc = "The `createConstantSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createConstantSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ConstantSourceNode`*"]
pub fn create_constant_source(this: &AudioContext) -> Result<ConstantSourceNode, JsValue>;
#[cfg(feature = "ConvolverNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createConvolver ) ]
#[doc = "The `createConvolver()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createConvolver)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ConvolverNode`*"]
pub fn create_convolver(this: &AudioContext) -> Result<ConvolverNode, JsValue>;
#[cfg(feature = "DelayNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createDelay ) ]
#[doc = "The `createDelay()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDelay)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DelayNode`*"]
pub fn create_delay(this: &AudioContext) -> Result<DelayNode, JsValue>;
#[cfg(feature = "DelayNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createDelay ) ]
#[doc = "The `createDelay()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDelay)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DelayNode`*"]
pub fn create_delay_with_max_delay_time(
this: &AudioContext,
max_delay_time: f64,
) -> Result<DelayNode, JsValue>;
#[cfg(feature = "DynamicsCompressorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createDynamicsCompressor ) ]
#[doc = "The `createDynamicsCompressor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDynamicsCompressor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DynamicsCompressorNode`*"]
pub fn create_dynamics_compressor(
this: &AudioContext,
) -> Result<DynamicsCompressorNode, JsValue>;
#[cfg(feature = "GainNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createGain ) ]
#[doc = "The `createGain()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `GainNode`*"]
pub fn create_gain(this: &AudioContext) -> Result<GainNode, JsValue>;
#[cfg(feature = "IirFilterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createIIRFilter ) ]
#[doc = "The `createIIRFilter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createIIRFilter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `IirFilterNode`*"]
pub fn create_iir_filter(
this: &AudioContext,
feedforward: &::wasm_bindgen::JsValue,
feedback: &::wasm_bindgen::JsValue,
) -> Result<IirFilterNode, JsValue>;
#[cfg(feature = "OscillatorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createOscillator ) ]
#[doc = "The `createOscillator()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createOscillator)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `OscillatorNode`*"]
pub fn create_oscillator(this: &AudioContext) -> Result<OscillatorNode, JsValue>;
#[cfg(feature = "PannerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createPanner ) ]
#[doc = "The `createPanner()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPanner)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PannerNode`*"]
pub fn create_panner(this: &AudioContext) -> Result<PannerNode, JsValue>;
#[cfg(feature = "PeriodicWave")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave ) ]
#[doc = "The `createPeriodicWave()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`*"]
pub fn create_periodic_wave(
this: &AudioContext,
real: &mut [f32],
imag: &mut [f32],
) -> Result<PeriodicWave, JsValue>;
#[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave ) ]
#[doc = "The `createPeriodicWave()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
pub fn create_periodic_wave_with_constraints(
this: &AudioContext,
real: &mut [f32],
imag: &mut [f32],
constraints: &PeriodicWaveConstraints,
) -> Result<PeriodicWave, JsValue>;
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor(this: &AudioContext) -> Result<ScriptProcessorNode, JsValue>;
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size(
this: &AudioContext,
buffer_size: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size_and_number_of_input_channels(
this: &AudioContext,
buffer_size: u32,
number_of_input_channels: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size_and_number_of_input_channels_and_number_of_output_channels(
this: &AudioContext,
buffer_size: u32,
number_of_input_channels: u32,
number_of_output_channels: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[cfg(feature = "StereoPannerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createStereoPanner ) ]
#[doc = "The `createStereoPanner()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createStereoPanner)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `StereoPannerNode`*"]
pub fn create_stereo_panner(this: &AudioContext) -> Result<StereoPannerNode, JsValue>;
#[cfg(feature = "WaveShaperNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = createWaveShaper ) ]
#[doc = "The `createWaveShaper()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createWaveShaper)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`, `WaveShaperNode`*"]
pub fn create_wave_shaper(this: &AudioContext) -> Result<WaveShaperNode, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn decode_audio_data(
this: &AudioContext,
audio_data: &::js_sys::ArrayBuffer,
) -> Result<::js_sys::Promise, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn decode_audio_data_with_success_callback(
this: &AudioContext,
audio_data: &::js_sys::ArrayBuffer,
success_callback: &::js_sys::Function,
) -> Result<::js_sys::Promise, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn decode_audio_data_with_success_callback_and_error_callback(
this: &AudioContext,
audio_data: &::js_sys::ArrayBuffer,
success_callback: &::js_sys::Function,
error_callback: &::js_sys::Function,
) -> Result<::js_sys::Promise, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioContext" , js_name = resume ) ]
#[doc = "The `resume()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/resume)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
pub fn resume(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>;
}

View File

@ -0,0 +1,39 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioContextOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioContextOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"]
pub type AudioContextOptions;
}
impl AudioContextOptions {
#[doc = "Construct a new `AudioContextOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[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
}
}

View File

@ -0,0 +1,12 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AudioContextState` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextState`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AudioContextState {
Suspended = "suspended",
Running = "running",
Closed = "closed",
}

View File

@ -0,0 +1,21 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioDestinationNode , typescript_type = "AudioDestinationNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioDestinationNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioDestinationNode`*"]
pub type AudioDestinationNode;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioDestinationNode" , js_name = maxChannelCount ) ]
#[doc = "Getter for the `maxChannelCount` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode/maxChannelCount)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioDestinationNode`*"]
pub fn max_channel_count(this: &AudioDestinationNode) -> u32;
}

View File

@ -0,0 +1,71 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioListener , typescript_type = "AudioListener" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioListener` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub type AudioListener;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioListener" , js_name = dopplerFactor ) ]
#[doc = "Getter for the `dopplerFactor` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/dopplerFactor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn doppler_factor(this: &AudioListener) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioListener" , js_name = dopplerFactor ) ]
#[doc = "Setter for the `dopplerFactor` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/dopplerFactor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn set_doppler_factor(this: &AudioListener, value: f64);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioListener" , js_name = speedOfSound ) ]
#[doc = "Getter for the `speedOfSound` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/speedOfSound)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn speed_of_sound(this: &AudioListener) -> f64;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioListener" , js_name = speedOfSound ) ]
#[doc = "Setter for the `speedOfSound` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/speedOfSound)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn set_speed_of_sound(this: &AudioListener, value: f64);
# [ wasm_bindgen ( method , structural , js_class = "AudioListener" , js_name = setOrientation ) ]
#[doc = "The `setOrientation()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/setOrientation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn set_orientation(
this: &AudioListener,
x: f64,
y: f64,
z: f64,
x_up: f64,
y_up: f64,
z_up: f64,
);
# [ wasm_bindgen ( method , structural , js_class = "AudioListener" , js_name = setPosition ) ]
#[doc = "The `setPosition()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/setPosition)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn set_position(this: &AudioListener, x: f64, y: f64, z: f64);
# [ wasm_bindgen ( method , structural , js_class = "AudioListener" , js_name = setVelocity ) ]
#[doc = "The `setVelocity()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioListener/setVelocity)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`*"]
pub fn set_velocity(this: &AudioListener, x: f64, y: f64, z: f64);
}

View File

@ -0,0 +1,208 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioNode , typescript_type = "AudioNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub type AudioNode;
#[cfg(feature = "BaseAudioContext")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = context ) ]
#[doc = "Getter for the `context` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/context)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `BaseAudioContext`*"]
pub fn context(this: &AudioNode) -> BaseAudioContext;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = numberOfInputs ) ]
#[doc = "Getter for the `numberOfInputs` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/numberOfInputs)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn number_of_inputs(this: &AudioNode) -> u32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = numberOfOutputs ) ]
#[doc = "Getter for the `numberOfOutputs` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/numberOfOutputs)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn number_of_outputs(this: &AudioNode) -> u32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = channelCount ) ]
#[doc = "Getter for the `channelCount` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelCount)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn channel_count(this: &AudioNode) -> u32;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioNode" , js_name = channelCount ) ]
#[doc = "Setter for the `channelCount` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelCount)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn set_channel_count(this: &AudioNode, value: u32);
#[cfg(feature = "ChannelCountMode")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = channelCountMode ) ]
#[doc = "Getter for the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelCountMode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `ChannelCountMode`*"]
pub fn channel_count_mode(this: &AudioNode) -> ChannelCountMode;
#[cfg(feature = "ChannelCountMode")]
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioNode" , js_name = channelCountMode ) ]
#[doc = "Setter for the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelCountMode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `ChannelCountMode`*"]
pub fn set_channel_count_mode(this: &AudioNode, value: ChannelCountMode);
#[cfg(feature = "ChannelInterpretation")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioNode" , js_name = channelInterpretation ) ]
#[doc = "Getter for the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelInterpretation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `ChannelInterpretation`*"]
pub fn channel_interpretation(this: &AudioNode) -> ChannelInterpretation;
#[cfg(feature = "ChannelInterpretation")]
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioNode" , js_name = channelInterpretation ) ]
#[doc = "Setter for the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/channelInterpretation)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `ChannelInterpretation`*"]
pub fn set_channel_interpretation(this: &AudioNode, value: ChannelInterpretation);
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = connect ) ]
#[doc = "The `connect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/connect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn connect_with_audio_node(
this: &AudioNode,
destination: &AudioNode,
) -> Result<AudioNode, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = connect ) ]
#[doc = "The `connect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/connect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn connect_with_audio_node_and_output(
this: &AudioNode,
destination: &AudioNode,
output: u32,
) -> Result<AudioNode, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = connect ) ]
#[doc = "The `connect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/connect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn connect_with_audio_node_and_output_and_input(
this: &AudioNode,
destination: &AudioNode,
output: u32,
input: u32,
) -> Result<AudioNode, JsValue>;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = connect ) ]
#[doc = "The `connect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/connect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `AudioParam`*"]
pub fn connect_with_audio_param(
this: &AudioNode,
destination: &AudioParam,
) -> Result<(), JsValue>;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = connect ) ]
#[doc = "The `connect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/connect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `AudioParam`*"]
pub fn connect_with_audio_param_and_output(
this: &AudioNode,
destination: &AudioParam,
output: u32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn disconnect(this: &AudioNode) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn disconnect_with_output(this: &AudioNode, output: u32) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn disconnect_with_audio_node(
this: &AudioNode,
destination: &AudioNode,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn disconnect_with_audio_node_and_output(
this: &AudioNode,
destination: &AudioNode,
output: u32,
) -> Result<(), JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`*"]
pub fn disconnect_with_audio_node_and_output_and_input(
this: &AudioNode,
destination: &AudioNode,
output: u32,
input: u32,
) -> Result<(), JsValue>;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `AudioParam`*"]
pub fn disconnect_with_audio_param(
this: &AudioNode,
destination: &AudioParam,
) -> Result<(), JsValue>;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioNode" , js_name = disconnect ) ]
#[doc = "The `disconnect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode/disconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNode`, `AudioParam`*"]
pub fn disconnect_with_audio_param_and_output(
this: &AudioNode,
destination: &AudioParam,
output: u32,
) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,75 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioNodeOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioNodeOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"]
pub type AudioNodeOptions;
}
impl AudioNodeOptions {
#[doc = "Construct a new `AudioNodeOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `channelCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"]
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
}
#[cfg(feature = "ChannelCountMode")]
#[doc = "Change the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"]
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
}
#[cfg(feature = "ChannelInterpretation")]
#[doc = "Change the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"]
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
}
}

View File

@ -0,0 +1,116 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioParam , typescript_type = "AudioParam" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioParam` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub type AudioParam;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioParam" , js_name = value ) ]
#[doc = "Getter for the `value` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/value)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn value(this: &AudioParam) -> f32;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioParam" , js_name = value ) ]
#[doc = "Setter for the `value` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/value)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn set_value(this: &AudioParam, value: f32);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioParam" , js_name = defaultValue ) ]
#[doc = "Getter for the `defaultValue` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/defaultValue)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn default_value(this: &AudioParam) -> f32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioParam" , js_name = minValue ) ]
#[doc = "Getter for the `minValue` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/minValue)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn min_value(this: &AudioParam) -> f32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioParam" , js_name = maxValue ) ]
#[doc = "Getter for the `maxValue` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/maxValue)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn max_value(this: &AudioParam) -> f32;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = cancelScheduledValues ) ]
#[doc = "The `cancelScheduledValues()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/cancelScheduledValues)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn cancel_scheduled_values(
this: &AudioParam,
start_time: f64,
) -> Result<AudioParam, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = exponentialRampToValueAtTime ) ]
#[doc = "The `exponentialRampToValueAtTime()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/exponentialRampToValueAtTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn exponential_ramp_to_value_at_time(
this: &AudioParam,
value: f32,
end_time: f64,
) -> Result<AudioParam, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = linearRampToValueAtTime ) ]
#[doc = "The `linearRampToValueAtTime()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/linearRampToValueAtTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn linear_ramp_to_value_at_time(
this: &AudioParam,
value: f32,
end_time: f64,
) -> Result<AudioParam, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = setTargetAtTime ) ]
#[doc = "The `setTargetAtTime()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/setTargetAtTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn set_target_at_time(
this: &AudioParam,
target: f32,
start_time: f64,
time_constant: f64,
) -> Result<AudioParam, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = setValueAtTime ) ]
#[doc = "The `setValueAtTime()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/setValueAtTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn set_value_at_time(
this: &AudioParam,
value: f32,
start_time: f64,
) -> Result<AudioParam, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioParam" , js_name = setValueCurveAtTime ) ]
#[doc = "The `setValueCurveAtTime()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/setValueCurveAtTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`*"]
pub fn set_value_curve_at_time(
this: &AudioParam,
values: &mut [f32],
start_time: f64,
duration: f64,
) -> Result<AudioParam, JsValue>;
}

View File

@ -0,0 +1,14 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioParamMap , typescript_type = "AudioParamMap" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioParamMap` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioParamMap)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParamMap`*"]
pub type AudioParamMap;
}

View File

@ -0,0 +1,37 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Event , extends = :: js_sys :: Object , js_name = AudioProcessingEvent , typescript_type = "AudioProcessingEvent" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioProcessingEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioProcessingEvent`*"]
pub type AudioProcessingEvent;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioProcessingEvent" , js_name = playbackTime ) ]
#[doc = "Getter for the `playbackTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent/playbackTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioProcessingEvent`*"]
pub fn playback_time(this: &AudioProcessingEvent) -> f64;
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioProcessingEvent" , js_name = inputBuffer ) ]
#[doc = "Getter for the `inputBuffer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent/inputBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioProcessingEvent`*"]
pub fn input_buffer(this: &AudioProcessingEvent) -> Result<AudioBuffer, JsValue>;
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioProcessingEvent" , js_name = outputBuffer ) ]
#[doc = "Getter for the `outputBuffer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioProcessingEvent/outputBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioProcessingEvent`*"]
pub fn output_buffer(this: &AudioProcessingEvent) -> Result<AudioBuffer, JsValue>;
}

View File

@ -0,0 +1,63 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioScheduledSourceNode , typescript_type = "AudioScheduledSourceNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioScheduledSourceNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
pub type AudioScheduledSourceNode;
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioScheduledSourceNode" , js_name = onended ) ]
#[doc = "Getter for the `onended` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/onended)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn onended(this: &AudioScheduledSourceNode) -> Option<::js_sys::Function>;
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioScheduledSourceNode" , js_name = onended ) ]
#[doc = "Setter for the `onended` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/onended)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn set_onended(this: &AudioScheduledSourceNode, value: Option<&::js_sys::Function>);
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioScheduledSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn start(this: &AudioScheduledSourceNode) -> Result<(), JsValue>;
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioScheduledSourceNode" , js_name = start ) ]
#[doc = "The `start()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/start)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn start_with_when(this: &AudioScheduledSourceNode, when: f64) -> Result<(), JsValue>;
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioScheduledSourceNode" , js_name = stop ) ]
#[doc = "The `stop()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/stop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn stop(this: &AudioScheduledSourceNode) -> Result<(), JsValue>;
#[deprecated(note = "doesn't exist in Safari, use parent class methods instead")]
# [ wasm_bindgen ( catch , method , structural , js_class = "AudioScheduledSourceNode" , js_name = stop ) ]
#[doc = "The `stop()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/stop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioScheduledSourceNode`*"]
pub fn stop_with_when(this: &AudioScheduledSourceNode, when: f64) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,14 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = MediaStreamTrack , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioStreamTrack , typescript_type = "AudioStreamTrack" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioStreamTrack` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioStreamTrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioStreamTrack`*"]
pub type AudioStreamTrack;
}

View File

@ -0,0 +1,56 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioTrack , typescript_type = "AudioTrack" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioTrack` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub type AudioTrack;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrack" , js_name = id ) ]
#[doc = "Getter for the `id` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/id)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn id(this: &AudioTrack) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrack" , js_name = kind ) ]
#[doc = "Getter for the `kind` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn kind(this: &AudioTrack) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrack" , js_name = label ) ]
#[doc = "Getter for the `label` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/label)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn label(this: &AudioTrack) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrack" , js_name = language ) ]
#[doc = "Getter for the `language` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn language(this: &AudioTrack) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrack" , js_name = enabled ) ]
#[doc = "Getter for the `enabled` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/enabled)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn enabled(this: &AudioTrack) -> bool;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioTrack" , js_name = enabled ) ]
#[doc = "Setter for the `enabled` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/enabled)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`*"]
pub fn set_enabled(this: &AudioTrack, value: bool);
}

View File

@ -0,0 +1,79 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioTrackList , typescript_type = "AudioTrackList" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioTrackList` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub type AudioTrackList;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrackList" , js_name = length ) ]
#[doc = "Getter for the `length` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/length)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn length(this: &AudioTrackList) -> u32;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrackList" , js_name = onchange ) ]
#[doc = "Getter for the `onchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn onchange(this: &AudioTrackList) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioTrackList" , js_name = onchange ) ]
#[doc = "Setter for the `onchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn set_onchange(this: &AudioTrackList, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrackList" , js_name = onaddtrack ) ]
#[doc = "Getter for the `onaddtrack` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onaddtrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn onaddtrack(this: &AudioTrackList) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioTrackList" , js_name = onaddtrack ) ]
#[doc = "Setter for the `onaddtrack` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onaddtrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn set_onaddtrack(this: &AudioTrackList, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioTrackList" , js_name = onremovetrack ) ]
#[doc = "Getter for the `onremovetrack` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onremovetrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn onremovetrack(this: &AudioTrackList) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioTrackList" , js_name = onremovetrack ) ]
#[doc = "Setter for the `onremovetrack` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onremovetrack)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrackList`*"]
pub fn set_onremovetrack(this: &AudioTrackList, value: Option<&::js_sys::Function>);
#[cfg(feature = "AudioTrack")]
# [ wasm_bindgen ( method , structural , js_class = "AudioTrackList" , js_name = getTrackById ) ]
#[doc = "The `getTrackById()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/getTrackById)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`, `AudioTrackList`*"]
pub fn get_track_by_id(this: &AudioTrackList, id: &str) -> Option<AudioTrack>;
#[cfg(feature = "AudioTrack")]
#[wasm_bindgen(method, structural, js_class = "AudioTrackList", indexing_getter)]
#[doc = "Indexing getter."]
#[doc = ""]
#[doc = ""]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioTrack`, `AudioTrackList`*"]
pub fn get(this: &AudioTrackList, index: u32) -> Option<AudioTrack>;
}

View File

@ -0,0 +1,14 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Worklet , extends = :: js_sys :: Object , js_name = AudioWorklet , typescript_type = "AudioWorklet" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioWorklet` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorklet`*"]
pub type AudioWorklet;
}

View File

@ -0,0 +1,46 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = WorkletGlobalScope , extends = :: js_sys :: Object , js_name = AudioWorkletGlobalScope , typescript_type = "AudioWorkletGlobalScope" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioWorkletGlobalScope` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
pub type AudioWorkletGlobalScope;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioWorkletGlobalScope" , js_name = currentFrame ) ]
#[doc = "Getter for the `currentFrame` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/currentFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
pub fn current_frame(this: &AudioWorkletGlobalScope) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioWorkletGlobalScope" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
pub fn current_time(this: &AudioWorkletGlobalScope) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioWorkletGlobalScope" , js_name = sampleRate ) ]
#[doc = "Getter for the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/sampleRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
pub fn sample_rate(this: &AudioWorkletGlobalScope) -> f32;
# [ wasm_bindgen ( method , structural , js_class = "AudioWorkletGlobalScope" , js_name = registerProcessor ) ]
#[doc = "The `registerProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/registerProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
pub fn register_processor(
this: &AudioWorkletGlobalScope,
name: &str,
processor_ctor: &::js_sys::Function,
);
}

View File

@ -0,0 +1,64 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioWorkletNode , typescript_type = "AudioWorkletNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioWorkletNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
pub type AudioWorkletNode;
#[cfg(feature = "AudioParamMap")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioWorkletNode" , js_name = parameters ) ]
#[doc = "Getter for the `parameters` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/parameters)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParamMap`, `AudioWorkletNode`*"]
pub fn parameters(this: &AudioWorkletNode) -> Result<AudioParamMap, JsValue>;
#[cfg(feature = "MessagePort")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioWorkletNode" , js_name = port ) ]
#[doc = "Getter for the `port` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/port)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `MessagePort`*"]
pub fn port(this: &AudioWorkletNode) -> Result<MessagePort, JsValue>;
# [ wasm_bindgen ( structural , method , getter , js_class = "AudioWorkletNode" , js_name = onprocessorerror ) ]
#[doc = "Getter for the `onprocessorerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/onprocessorerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
pub fn onprocessorerror(this: &AudioWorkletNode) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "AudioWorkletNode" , js_name = onprocessorerror ) ]
#[doc = "Setter for the `onprocessorerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/onprocessorerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
pub fn set_onprocessorerror(this: &AudioWorkletNode, value: Option<&::js_sys::Function>);
#[cfg(feature = "BaseAudioContext")]
#[wasm_bindgen(catch, constructor, js_class = "AudioWorkletNode")]
#[doc = "The `new AudioWorkletNode(..)` constructor, creating a new instance of `AudioWorkletNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/AudioWorkletNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `BaseAudioContext`*"]
pub fn new(context: &BaseAudioContext, name: &str) -> Result<AudioWorkletNode, JsValue>;
#[cfg(all(feature = "AudioWorkletNodeOptions", feature = "BaseAudioContext",))]
#[wasm_bindgen(catch, constructor, js_class = "AudioWorkletNode")]
#[doc = "The `new AudioWorkletNode(..)` constructor, creating a new instance of `AudioWorkletNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/AudioWorkletNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `AudioWorkletNodeOptions`, `BaseAudioContext`*"]
pub fn new_with_options(
context: &BaseAudioContext,
name: &str,
options: &AudioWorkletNodeOptions,
) -> Result<AudioWorkletNode, JsValue>;
}

View File

@ -0,0 +1,143 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioWorkletNodeOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioWorkletNodeOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub type AudioWorkletNodeOptions;
}
impl AudioWorkletNodeOptions {
#[doc = "Construct a new `AudioWorkletNodeOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `channelCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
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
}
#[cfg(feature = "ChannelCountMode")]
#[doc = "Change the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"]
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
}
#[cfg(feature = "ChannelInterpretation")]
#[doc = "Change the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,39 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AudioWorkletProcessor , typescript_type = "AudioWorkletProcessor" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AudioWorkletProcessor` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletProcessor`*"]
pub type AudioWorkletProcessor;
#[cfg(feature = "MessagePort")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "AudioWorkletProcessor" , js_name = port ) ]
#[doc = "Getter for the `port` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor/port)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletProcessor`, `MessagePort`*"]
pub fn port(this: &AudioWorkletProcessor) -> Result<MessagePort, JsValue>;
#[wasm_bindgen(catch, constructor, js_class = "AudioWorkletProcessor")]
#[doc = "The `new AudioWorkletProcessor(..)` constructor, creating a new instance of `AudioWorkletProcessor`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor/AudioWorkletProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletProcessor`*"]
pub fn new() -> Result<AudioWorkletProcessor, JsValue>;
#[cfg(feature = "AudioWorkletNodeOptions")]
#[wasm_bindgen(catch, constructor, js_class = "AudioWorkletProcessor")]
#[doc = "The `new AudioWorkletProcessor(..)` constructor, creating a new instance of `AudioWorkletProcessor`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor/AudioWorkletProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `AudioWorkletProcessor`*"]
pub fn new_with_options(
options: &AudioWorkletNodeOptions,
) -> Result<AudioWorkletProcessor, JsValue>;
}

View File

@ -0,0 +1,35 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AuthenticationExtensionsClientInputs ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticationExtensionsClientInputs` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub type AuthenticationExtensionsClientInputs;
}
impl AuthenticationExtensionsClientInputs {
#[doc = "Construct a new `AuthenticationExtensionsClientInputs`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `appid` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
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
}
}

View File

@ -0,0 +1,35 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AuthenticationExtensionsClientOutputs ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticationExtensionsClientOutputs` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub type AuthenticationExtensionsClientOutputs;
}
impl AuthenticationExtensionsClientOutputs {
#[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `appid` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
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
}
}

View File

@ -0,0 +1,35 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AuthenticatorResponse , extends = :: js_sys :: Object , js_name = AuthenticatorAssertionResponse , typescript_type = "AuthenticatorAssertionResponse" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticatorAssertionResponse` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponse`*"]
pub type AuthenticatorAssertionResponse;
# [ wasm_bindgen ( structural , method , getter , js_class = "AuthenticatorAssertionResponse" , js_name = authenticatorData ) ]
#[doc = "Getter for the `authenticatorData` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/authenticatorData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponse`*"]
pub fn authenticator_data(this: &AuthenticatorAssertionResponse) -> ::js_sys::ArrayBuffer;
# [ wasm_bindgen ( structural , method , getter , js_class = "AuthenticatorAssertionResponse" , js_name = signature ) ]
#[doc = "Getter for the `signature` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/signature)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponse`*"]
pub fn signature(this: &AuthenticatorAssertionResponse) -> ::js_sys::ArrayBuffer;
# [ wasm_bindgen ( structural , method , getter , js_class = "AuthenticatorAssertionResponse" , js_name = userHandle ) ]
#[doc = "Getter for the `userHandle` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/userHandle)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponse`*"]
pub fn user_handle(this: &AuthenticatorAssertionResponse) -> Option<::js_sys::ArrayBuffer>;
}

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AuthenticatorAttachment` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AuthenticatorAttachment {
Platform = "platform",
CrossPlatform = "cross-platform",
}

View File

@ -0,0 +1,21 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AuthenticatorResponse , extends = :: js_sys :: Object , js_name = AuthenticatorAttestationResponse , typescript_type = "AuthenticatorAttestationResponse" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticatorAttestationResponse` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponse`*"]
pub type AuthenticatorAttestationResponse;
# [ wasm_bindgen ( structural , method , getter , js_class = "AuthenticatorAttestationResponse" , js_name = attestationObject ) ]
#[doc = "Getter for the `attestationObject` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/attestationObject)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponse`*"]
pub fn attestation_object(this: &AuthenticatorAttestationResponse) -> ::js_sys::ArrayBuffer;
}

View File

@ -0,0 +1,21 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AuthenticatorResponse , typescript_type = "AuthenticatorResponse" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticatorResponse` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorResponse)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorResponse`*"]
pub type AuthenticatorResponse;
# [ wasm_bindgen ( structural , method , getter , js_class = "AuthenticatorResponse" , js_name = clientDataJSON ) ]
#[doc = "Getter for the `clientDataJSON` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorResponse/clientDataJSON)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorResponse`*"]
pub fn client_data_json(this: &AuthenticatorResponse) -> ::js_sys::ArrayBuffer;
}

View File

@ -0,0 +1,75 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AuthenticatorSelectionCriteria ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticatorSelectionCriteria` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"]
pub type AuthenticatorSelectionCriteria;
}
impl AuthenticatorSelectionCriteria {
#[doc = "Construct a new `AuthenticatorSelectionCriteria`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "AuthenticatorAttachment")]
#[doc = "Change the `authenticatorAttachment` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"]
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
}
#[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
}
#[cfg(feature = "UserVerificationRequirement")]
#[doc = "Change the `userVerification` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"]
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
}
}

View File

@ -0,0 +1,12 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AuthenticatorTransport` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorTransport`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AuthenticatorTransport {
Usb = "usb",
Nfc = "nfc",
Ble = "ble",
}

View File

@ -0,0 +1,10 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `AutoKeyword` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutoKeyword`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AutoKeyword {
Auto = "auto",
}

View File

@ -0,0 +1,90 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = AutocompleteInfo ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AutocompleteInfo` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub type AutocompleteInfo;
}
impl AutocompleteInfo {
#[doc = "Construct a new `AutocompleteInfo`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `addressType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,28 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BarProp , typescript_type = "BarProp" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BarProp` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BarProp)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BarProp`*"]
pub type BarProp;
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "BarProp" , js_name = visible ) ]
#[doc = "Getter for the `visible` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BarProp/visible)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BarProp`*"]
pub fn visible(this: &BarProp) -> Result<bool, JsValue>;
# [ wasm_bindgen ( structural , catch , method , setter , js_class = "BarProp" , js_name = visible ) ]
#[doc = "Setter for the `visible` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BarProp/visible)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BarProp`*"]
pub fn set_visible(this: &BarProp, value: bool) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,395 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = BaseAudioContext , typescript_type = "BaseAudioContext" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BaseAudioContext` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
pub type BaseAudioContext;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioDestinationNode")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = destination ) ]
#[doc = "Getter for the `destination` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/destination)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioDestinationNode`, `BaseAudioContext`*"]
pub fn destination(this: &BaseAudioContext) -> AudioDestinationNode;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = sampleRate ) ]
#[doc = "Getter for the `sampleRate` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/sampleRate)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn sample_rate(this: &BaseAudioContext) -> f32;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = currentTime ) ]
#[doc = "Getter for the `currentTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/currentTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn current_time(this: &BaseAudioContext) -> f64;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioListener")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = listener ) ]
#[doc = "Getter for the `listener` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/listener)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioListener`, `BaseAudioContext`*"]
pub fn listener(this: &BaseAudioContext) -> AudioListener;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioContextState")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = state ) ]
#[doc = "Getter for the `state` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/state)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioContextState`, `BaseAudioContext`*"]
pub fn state(this: &BaseAudioContext) -> AudioContextState;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioWorklet")]
# [ wasm_bindgen ( structural , catch , method , getter , js_class = "BaseAudioContext" , js_name = audioWorklet ) ]
#[doc = "Getter for the `audioWorklet` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/audioWorklet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioWorklet`, `BaseAudioContext`*"]
pub fn audio_worklet(this: &BaseAudioContext) -> Result<AudioWorklet, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BaseAudioContext" , js_name = onstatechange ) ]
#[doc = "Getter for the `onstatechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/onstatechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn onstatechange(this: &BaseAudioContext) -> Option<::js_sys::Function>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( structural , method , setter , js_class = "BaseAudioContext" , js_name = onstatechange ) ]
#[doc = "Setter for the `onstatechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/onstatechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn set_onstatechange(this: &BaseAudioContext, value: Option<&::js_sys::Function>);
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AnalyserNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createAnalyser ) ]
#[doc = "The `createAnalyser()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createAnalyser)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `BaseAudioContext`*"]
pub fn create_analyser(this: &BaseAudioContext) -> Result<AnalyserNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "BiquadFilterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createBiquadFilter ) ]
#[doc = "The `createBiquadFilter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBiquadFilter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `BiquadFilterNode`*"]
pub fn create_biquad_filter(this: &BaseAudioContext) -> Result<BiquadFilterNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioBuffer")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createBuffer ) ]
#[doc = "The `createBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `BaseAudioContext`*"]
pub fn create_buffer(
this: &BaseAudioContext,
number_of_channels: u32,
length: u32,
sample_rate: f32,
) -> Result<AudioBuffer, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "AudioBufferSourceNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createBufferSource ) ]
#[doc = "The `createBufferSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBufferSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `BaseAudioContext`*"]
pub fn create_buffer_source(this: &BaseAudioContext) -> Result<AudioBufferSourceNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ChannelMergerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createChannelMerger ) ]
#[doc = "The `createChannelMerger()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createChannelMerger)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ChannelMergerNode`*"]
pub fn create_channel_merger(this: &BaseAudioContext) -> Result<ChannelMergerNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ChannelMergerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createChannelMerger ) ]
#[doc = "The `createChannelMerger()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createChannelMerger)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ChannelMergerNode`*"]
pub fn create_channel_merger_with_number_of_inputs(
this: &BaseAudioContext,
number_of_inputs: u32,
) -> Result<ChannelMergerNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ChannelSplitterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createChannelSplitter ) ]
#[doc = "The `createChannelSplitter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createChannelSplitter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ChannelSplitterNode`*"]
pub fn create_channel_splitter(this: &BaseAudioContext)
-> Result<ChannelSplitterNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ChannelSplitterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createChannelSplitter ) ]
#[doc = "The `createChannelSplitter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createChannelSplitter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ChannelSplitterNode`*"]
pub fn create_channel_splitter_with_number_of_outputs(
this: &BaseAudioContext,
number_of_outputs: u32,
) -> Result<ChannelSplitterNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ConstantSourceNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createConstantSource ) ]
#[doc = "The `createConstantSource()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createConstantSource)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ConstantSourceNode`*"]
pub fn create_constant_source(this: &BaseAudioContext) -> Result<ConstantSourceNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ConvolverNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createConvolver ) ]
#[doc = "The `createConvolver()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createConvolver)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ConvolverNode`*"]
pub fn create_convolver(this: &BaseAudioContext) -> Result<ConvolverNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "DelayNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createDelay ) ]
#[doc = "The `createDelay()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createDelay)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `DelayNode`*"]
pub fn create_delay(this: &BaseAudioContext) -> Result<DelayNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "DelayNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createDelay ) ]
#[doc = "The `createDelay()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createDelay)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `DelayNode`*"]
pub fn create_delay_with_max_delay_time(
this: &BaseAudioContext,
max_delay_time: f64,
) -> Result<DelayNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "DynamicsCompressorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createDynamicsCompressor ) ]
#[doc = "The `createDynamicsCompressor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `DynamicsCompressorNode`*"]
pub fn create_dynamics_compressor(
this: &BaseAudioContext,
) -> Result<DynamicsCompressorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "GainNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createGain ) ]
#[doc = "The `createGain()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createGain)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `GainNode`*"]
pub fn create_gain(this: &BaseAudioContext) -> Result<GainNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "IirFilterNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createIIRFilter ) ]
#[doc = "The `createIIRFilter()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createIIRFilter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `IirFilterNode`*"]
pub fn create_iir_filter(
this: &BaseAudioContext,
feedforward: &::wasm_bindgen::JsValue,
feedback: &::wasm_bindgen::JsValue,
) -> Result<IirFilterNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "OscillatorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createOscillator ) ]
#[doc = "The `createOscillator()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createOscillator)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `OscillatorNode`*"]
pub fn create_oscillator(this: &BaseAudioContext) -> Result<OscillatorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "PannerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createPanner ) ]
#[doc = "The `createPanner()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createPanner)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `PannerNode`*"]
pub fn create_panner(this: &BaseAudioContext) -> Result<PannerNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "PeriodicWave")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createPeriodicWave ) ]
#[doc = "The `createPeriodicWave()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createPeriodicWave)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `PeriodicWave`*"]
pub fn create_periodic_wave(
this: &BaseAudioContext,
real: &mut [f32],
imag: &mut [f32],
) -> Result<PeriodicWave, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createPeriodicWave ) ]
#[doc = "The `createPeriodicWave()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createPeriodicWave)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
pub fn create_periodic_wave_with_constraints(
this: &BaseAudioContext,
real: &mut [f32],
imag: &mut [f32],
constraints: &PeriodicWaveConstraints,
) -> Result<PeriodicWave, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor(this: &BaseAudioContext)
-> Result<ScriptProcessorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size(
this: &BaseAudioContext,
buffer_size: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size_and_number_of_input_channels(
this: &BaseAudioContext,
buffer_size: u32,
number_of_input_channels: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "ScriptProcessorNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createScriptProcessor ) ]
#[doc = "The `createScriptProcessor()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createScriptProcessor)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ScriptProcessorNode`*"]
pub fn create_script_processor_with_buffer_size_and_number_of_input_channels_and_number_of_output_channels(
this: &BaseAudioContext,
buffer_size: u32,
number_of_input_channels: u32,
number_of_output_channels: u32,
) -> Result<ScriptProcessorNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "StereoPannerNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createStereoPanner ) ]
#[doc = "The `createStereoPanner()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createStereoPanner)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `StereoPannerNode`*"]
pub fn create_stereo_panner(this: &BaseAudioContext) -> Result<StereoPannerNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
#[cfg(feature = "WaveShaperNode")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = createWaveShaper ) ]
#[doc = "The `createWaveShaper()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createWaveShaper)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `WaveShaperNode`*"]
pub fn create_wave_shaper(this: &BaseAudioContext) -> Result<WaveShaperNode, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn decode_audio_data(
this: &BaseAudioContext,
audio_data: &::js_sys::ArrayBuffer,
) -> Result<::js_sys::Promise, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn decode_audio_data_with_success_callback(
this: &BaseAudioContext,
audio_data: &::js_sys::ArrayBuffer,
success_callback: &::js_sys::Function,
) -> Result<::js_sys::Promise, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = decodeAudioData ) ]
#[doc = "The `decodeAudioData()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn decode_audio_data_with_success_callback_and_error_callback(
this: &BaseAudioContext,
audio_data: &::js_sys::ArrayBuffer,
success_callback: &::js_sys::Function,
error_callback: &::js_sys::Function,
) -> Result<::js_sys::Promise, JsValue>;
#[deprecated(note = "doesn't exist in Safari, use `AudioContext` instead now")]
# [ wasm_bindgen ( catch , method , structural , js_class = "BaseAudioContext" , js_name = resume ) ]
#[doc = "The `resume()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/resume)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`*"]
pub fn resume(this: &BaseAudioContext) -> Result<::js_sys::Promise, JsValue>;
}

View File

@ -0,0 +1,102 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BaseComputedKeyframe ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BaseComputedKeyframe` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub type BaseComputedKeyframe;
}
impl BaseComputedKeyframe {
#[doc = "Construct a new `BaseComputedKeyframe`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "CompositeOperation")]
#[doc = "Change the `composite` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,85 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BaseKeyframe ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BaseKeyframe` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub type BaseKeyframe;
}
impl BaseKeyframe {
#[doc = "Construct a new `BaseKeyframe`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "CompositeOperation")]
#[doc = "Change the `composite` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,67 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BasePropertyIndexedKeyframe ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BasePropertyIndexedKeyframe` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub type BasePropertyIndexedKeyframe;
}
impl BasePropertyIndexedKeyframe {
#[doc = "Construct a new `BasePropertyIndexedKeyframe`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `composite` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"]
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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,56 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BasicCardRequest ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BasicCardRequest` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
pub type BasicCardRequest;
}
impl BasicCardRequest {
#[doc = "Construct a new `BasicCardRequest`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `supportedNetworks` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,126 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BasicCardResponse ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BasicCardResponse` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub type BasicCardResponse;
}
impl BasicCardResponse {
#[doc = "Construct a new `BasicCardResponse`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"]
pub fn new(card_number: &str) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.card_number(card_number);
ret
}
#[cfg(feature = "PaymentAddress")]
#[doc = "Change the `billingAddress` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,12 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `BasicCardType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BasicCardType`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BasicCardType {
Credit = "credit",
Debit = "debit",
Prepaid = "prepaid",
}

View File

@ -0,0 +1,98 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = BatteryManager , typescript_type = "BatteryManager" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BatteryManager` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub type BatteryManager;
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = charging ) ]
#[doc = "Getter for the `charging` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/charging)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn charging(this: &BatteryManager) -> bool;
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = chargingTime ) ]
#[doc = "Getter for the `chargingTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/chargingTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn charging_time(this: &BatteryManager) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = dischargingTime ) ]
#[doc = "Getter for the `dischargingTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/dischargingTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn discharging_time(this: &BatteryManager) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = level ) ]
#[doc = "Getter for the `level` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/level)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn level(this: &BatteryManager) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = onchargingchange ) ]
#[doc = "Getter for the `onchargingchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn onchargingchange(this: &BatteryManager) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BatteryManager" , js_name = onchargingchange ) ]
#[doc = "Setter for the `onchargingchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn set_onchargingchange(this: &BatteryManager, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = onchargingtimechange ) ]
#[doc = "Getter for the `onchargingtimechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn onchargingtimechange(this: &BatteryManager) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BatteryManager" , js_name = onchargingtimechange ) ]
#[doc = "Setter for the `onchargingtimechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn set_onchargingtimechange(this: &BatteryManager, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = ondischargingtimechange ) ]
#[doc = "Getter for the `ondischargingtimechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn ondischargingtimechange(this: &BatteryManager) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BatteryManager" , js_name = ondischargingtimechange ) ]
#[doc = "Setter for the `ondischargingtimechange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn set_ondischargingtimechange(this: &BatteryManager, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "BatteryManager" , js_name = onlevelchange ) ]
#[doc = "Getter for the `onlevelchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn onlevelchange(this: &BatteryManager) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BatteryManager" , js_name = onlevelchange ) ]
#[doc = "Setter for the `onlevelchange` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
pub fn set_onlevelchange(this: &BatteryManager, value: Option<&::js_sys::Function>);
}

View File

@ -0,0 +1,28 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Event , extends = :: js_sys :: Object , js_name = BeforeUnloadEvent , typescript_type = "BeforeUnloadEvent" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BeforeUnloadEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
pub type BeforeUnloadEvent;
# [ wasm_bindgen ( structural , method , getter , js_class = "BeforeUnloadEvent" , js_name = returnValue ) ]
#[doc = "Getter for the `returnValue` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent/returnValue)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
pub fn return_value(this: &BeforeUnloadEvent) -> String;
# [ wasm_bindgen ( structural , method , setter , js_class = "BeforeUnloadEvent" , js_name = returnValue ) ]
#[doc = "Setter for the `returnValue` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent/returnValue)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BeforeUnloadEvent`*"]
pub fn set_return_value(this: &BeforeUnloadEvent, value: &str);
}

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `BinaryType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BinaryType`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BinaryType {
Blob = "blob",
Arraybuffer = "arraybuffer",
}

View File

@ -0,0 +1,93 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = BiquadFilterNode , typescript_type = "BiquadFilterNode" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BiquadFilterNode` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterNode`*"]
pub type BiquadFilterNode;
#[cfg(feature = "BiquadFilterType")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BiquadFilterNode" , js_name = type ) ]
#[doc = "Getter for the `type` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/type)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterNode`, `BiquadFilterType`*"]
pub fn type_(this: &BiquadFilterNode) -> BiquadFilterType;
#[cfg(feature = "BiquadFilterType")]
# [ wasm_bindgen ( structural , method , setter , js_class = "BiquadFilterNode" , js_name = type ) ]
#[doc = "Setter for the `type` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/type)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterNode`, `BiquadFilterType`*"]
pub fn set_type(this: &BiquadFilterNode, value: BiquadFilterType);
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BiquadFilterNode" , js_name = frequency ) ]
#[doc = "Getter for the `frequency` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/frequency)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`, `BiquadFilterNode`*"]
pub fn frequency(this: &BiquadFilterNode) -> AudioParam;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BiquadFilterNode" , js_name = detune ) ]
#[doc = "Getter for the `detune` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/detune)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`, `BiquadFilterNode`*"]
pub fn detune(this: &BiquadFilterNode) -> AudioParam;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BiquadFilterNode" , js_name = Q ) ]
#[doc = "Getter for the `Q` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/Q)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`, `BiquadFilterNode`*"]
pub fn q(this: &BiquadFilterNode) -> AudioParam;
#[cfg(feature = "AudioParam")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BiquadFilterNode" , js_name = gain ) ]
#[doc = "Getter for the `gain` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/gain)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AudioParam`, `BiquadFilterNode`*"]
pub fn gain(this: &BiquadFilterNode) -> AudioParam;
#[cfg(feature = "BaseAudioContext")]
#[wasm_bindgen(catch, constructor, js_class = "BiquadFilterNode")]
#[doc = "The `new BiquadFilterNode(..)` constructor, creating a new instance of `BiquadFilterNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/BiquadFilterNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `BiquadFilterNode`*"]
pub fn new(context: &BaseAudioContext) -> Result<BiquadFilterNode, JsValue>;
#[cfg(all(feature = "BaseAudioContext", feature = "BiquadFilterOptions",))]
#[wasm_bindgen(catch, constructor, js_class = "BiquadFilterNode")]
#[doc = "The `new BiquadFilterNode(..)` constructor, creating a new instance of `BiquadFilterNode`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/BiquadFilterNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `BiquadFilterNode`, `BiquadFilterOptions`*"]
pub fn new_with_options(
context: &BaseAudioContext,
options: &BiquadFilterOptions,
) -> Result<BiquadFilterNode, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "BiquadFilterNode" , js_name = getFrequencyResponse ) ]
#[doc = "The `getFrequencyResponse()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode/getFrequencyResponse)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterNode`*"]
pub fn get_frequency_response(
this: &BiquadFilterNode,
frequency_hz: &mut [f32],
mag_response: &mut [f32],
phase_response: &mut [f32],
);
}

View File

@ -0,0 +1,146 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BiquadFilterOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BiquadFilterOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub type BiquadFilterOptions;
}
impl BiquadFilterOptions {
#[doc = "Construct a new `BiquadFilterOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `channelCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
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
}
#[cfg(feature = "ChannelCountMode")]
#[doc = "Change the `channelCountMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"]
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
}
#[cfg(feature = "ChannelInterpretation")]
#[doc = "Change the `channelInterpretation` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"]
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
}
#[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
}
#[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
}
#[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
}
#[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
}
#[cfg(feature = "BiquadFilterType")]
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"]
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
}
}

View File

@ -0,0 +1,17 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `BiquadFilterType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BiquadFilterType`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BiquadFilterType {
Lowpass = "lowpass",
Highpass = "highpass",
Bandpass = "bandpass",
Lowshelf = "lowshelf",
Highshelf = "highshelf",
Peaking = "peaking",
Notch = "notch",
Allpass = "allpass",
}

View File

@ -0,0 +1,222 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = Blob , typescript_type = "Blob" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Blob` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub type Blob;
# [ wasm_bindgen ( structural , method , getter , js_class = "Blob" , js_name = size ) ]
#[doc = "Getter for the `size` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/size)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn size(this: &Blob) -> f64;
# [ wasm_bindgen ( structural , method , getter , js_class = "Blob" , js_name = type ) ]
#[doc = "Getter for the `type` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/type)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn type_(this: &Blob) -> String;
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn new() -> Result<Blob, JsValue>;
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn new_with_buffer_source_sequence(
blob_parts: &::wasm_bindgen::JsValue,
) -> Result<Blob, JsValue>;
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn new_with_u8_array_sequence(
blob_parts: &::wasm_bindgen::JsValue,
) -> Result<Blob, JsValue>;
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn new_with_blob_sequence(blob_parts: &::wasm_bindgen::JsValue) -> Result<Blob, JsValue>;
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn new_with_str_sequence(blob_parts: &::wasm_bindgen::JsValue) -> Result<Blob, JsValue>;
#[cfg(feature = "BlobPropertyBag")]
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
pub fn new_with_buffer_source_sequence_and_options(
blob_parts: &::wasm_bindgen::JsValue,
options: &BlobPropertyBag,
) -> Result<Blob, JsValue>;
#[cfg(feature = "BlobPropertyBag")]
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
pub fn new_with_u8_array_sequence_and_options(
blob_parts: &::wasm_bindgen::JsValue,
options: &BlobPropertyBag,
) -> Result<Blob, JsValue>;
#[cfg(feature = "BlobPropertyBag")]
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
pub fn new_with_blob_sequence_and_options(
blob_parts: &::wasm_bindgen::JsValue,
options: &BlobPropertyBag,
) -> Result<Blob, JsValue>;
#[cfg(feature = "BlobPropertyBag")]
#[wasm_bindgen(catch, constructor, js_class = "Blob")]
#[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
pub fn new_with_str_sequence_and_options(
blob_parts: &::wasm_bindgen::JsValue,
options: &BlobPropertyBag,
) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "Blob" , js_name = arrayBuffer ) ]
#[doc = "The `arrayBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn array_buffer(this: &Blob) -> ::js_sys::Promise;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice(this: &Blob) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_i32(this: &Blob, start: i32) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_f64(this: &Blob, start: f64) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_i32_and_i32(this: &Blob, start: i32, end: i32) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_f64_and_i32(this: &Blob, start: f64, end: i32) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_i32_and_f64(this: &Blob, start: i32, end: f64) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_f64_and_f64(this: &Blob, start: f64, end: f64) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_i32_and_i32_and_content_type(
this: &Blob,
start: i32,
end: i32,
content_type: &str,
) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_f64_and_i32_and_content_type(
this: &Blob,
start: f64,
end: i32,
content_type: &str,
) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_i32_and_f64_and_content_type(
this: &Blob,
start: i32,
end: f64,
content_type: &str,
) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( catch , method , structural , js_class = "Blob" , js_name = slice ) ]
#[doc = "The `slice()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn slice_with_f64_and_f64_and_content_type(
this: &Blob,
start: f64,
end: f64,
content_type: &str,
) -> Result<Blob, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "Blob" , js_name = text ) ]
#[doc = "The `text()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/text)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`*"]
pub fn text(this: &Blob) -> ::js_sys::Promise;
}

View File

@ -0,0 +1,40 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = Event , extends = :: js_sys :: Object , js_name = BlobEvent , typescript_type = "BlobEvent" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BlobEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEvent`*"]
pub type BlobEvent;
#[cfg(feature = "Blob")]
# [ wasm_bindgen ( structural , method , getter , js_class = "BlobEvent" , js_name = data ) ]
#[doc = "Getter for the `data` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent/data)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEvent`*"]
pub fn data(this: &BlobEvent) -> Option<Blob>;
#[wasm_bindgen(catch, constructor, js_class = "BlobEvent")]
#[doc = "The `new BlobEvent(..)` constructor, creating a new instance of `BlobEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent/BlobEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEvent`*"]
pub fn new(type_: &str) -> Result<BlobEvent, JsValue>;
#[cfg(feature = "BlobEventInit")]
#[wasm_bindgen(catch, constructor, js_class = "BlobEvent")]
#[doc = "The `new BlobEvent(..)` constructor, creating a new instance of `BlobEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BlobEvent/BlobEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEvent`, `BlobEventInit`*"]
pub fn new_with_event_init_dict(
type_: &str,
event_init_dict: &BlobEventInit,
) -> Result<BlobEvent, JsValue>;
}

View File

@ -0,0 +1,87 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BlobEventInit ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BlobEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub type BlobEventInit;
}
impl BlobEventInit {
#[doc = "Construct a new `BlobEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"]
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
}
#[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
}
#[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
}
#[cfg(feature = "Blob")]
#[doc = "Change the `data` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"]
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
}
}

View File

@ -0,0 +1,53 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BlobPropertyBag ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BlobPropertyBag` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
pub type BlobPropertyBag;
}
impl BlobPropertyBag {
#[doc = "Construct a new `BlobPropertyBag`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "EndingTypes")]
#[doc = "Change the `endings` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,39 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BlockParsingOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BlockParsingOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"]
pub type BlockParsingOptions;
}
impl BlockParsingOptions {
#[doc = "Construct a new `BlockParsingOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `blockScriptCreated` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"]
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
}
}

View File

@ -0,0 +1,53 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BoxQuadOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BoxQuadOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
pub type BoxQuadOptions;
}
impl BoxQuadOptions {
#[doc = "Construct a new `BoxQuadOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "CssBoxType")]
#[doc = "Change the `box` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,73 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = BroadcastChannel , typescript_type = "BroadcastChannel" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BroadcastChannel` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub type BroadcastChannel;
# [ wasm_bindgen ( structural , method , getter , js_class = "BroadcastChannel" , js_name = name ) ]
#[doc = "Getter for the `name` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/name)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn name(this: &BroadcastChannel) -> String;
# [ wasm_bindgen ( structural , method , getter , js_class = "BroadcastChannel" , js_name = onmessage ) ]
#[doc = "Getter for the `onmessage` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn onmessage(this: &BroadcastChannel) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BroadcastChannel" , js_name = onmessage ) ]
#[doc = "Setter for the `onmessage` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn set_onmessage(this: &BroadcastChannel, value: Option<&::js_sys::Function>);
# [ wasm_bindgen ( structural , method , getter , js_class = "BroadcastChannel" , js_name = onmessageerror ) ]
#[doc = "Getter for the `onmessageerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn onmessageerror(this: &BroadcastChannel) -> Option<::js_sys::Function>;
# [ wasm_bindgen ( structural , method , setter , js_class = "BroadcastChannel" , js_name = onmessageerror ) ]
#[doc = "Setter for the `onmessageerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessageerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn set_onmessageerror(this: &BroadcastChannel, value: Option<&::js_sys::Function>);
#[wasm_bindgen(catch, constructor, js_class = "BroadcastChannel")]
#[doc = "The `new BroadcastChannel(..)` constructor, creating a new instance of `BroadcastChannel`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/BroadcastChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn new(channel: &str) -> Result<BroadcastChannel, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "BroadcastChannel" , js_name = close ) ]
#[doc = "The `close()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/close)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn close(this: &BroadcastChannel);
# [ wasm_bindgen ( catch , method , structural , js_class = "BroadcastChannel" , js_name = postMessage ) ]
#[doc = "The `postMessage()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/postMessage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BroadcastChannel`*"]
pub fn post_message(
this: &BroadcastChannel,
message: &::wasm_bindgen::JsValue,
) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,56 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BrowserElementDownloadOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BrowserElementDownloadOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
pub type BrowserElementDownloadOptions;
}
impl BrowserElementDownloadOptions {
#[doc = "Construct a new `BrowserElementDownloadOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `filename` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,49 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BrowserElementExecuteScriptOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BrowserElementExecuteScriptOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
pub type BrowserElementExecuteScriptOptions;
}
impl BrowserElementExecuteScriptOptions {
#[doc = "Construct a new `BrowserElementExecuteScriptOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `origin` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,35 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = BrowserFeedWriter , typescript_type = "BrowserFeedWriter" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `BrowserFeedWriter` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BrowserFeedWriter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFeedWriter`*"]
pub type BrowserFeedWriter;
#[wasm_bindgen(catch, constructor, js_class = "BrowserFeedWriter")]
#[doc = "The `new BrowserFeedWriter(..)` constructor, creating a new instance of `BrowserFeedWriter`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BrowserFeedWriter/BrowserFeedWriter)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFeedWriter`*"]
pub fn new() -> Result<BrowserFeedWriter, JsValue>;
# [ wasm_bindgen ( method , structural , js_class = "BrowserFeedWriter" , js_name = close ) ]
#[doc = "The `close()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BrowserFeedWriter/close)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFeedWriter`*"]
pub fn close(this: &BrowserFeedWriter);
# [ wasm_bindgen ( method , structural , js_class = "BrowserFeedWriter" , js_name = writeContent ) ]
#[doc = "The `writeContent()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BrowserFeedWriter/writeContent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFeedWriter`*"]
pub fn write_content(this: &BrowserFeedWriter);
}

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `BrowserFindCaseSensitivity` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFindCaseSensitivity`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BrowserFindCaseSensitivity {
CaseSensitive = "case-sensitive",
CaseInsensitive = "case-insensitive",
}

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `BrowserFindDirection` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `BrowserFindDirection`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BrowserFindDirection {
Forward = "forward",
Backward = "backward",
}

View File

@ -0,0 +1,239 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = Cache , typescript_type = "Cache" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Cache` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub type Cache;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = add ) ]
#[doc = "The `add()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/add)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`*"]
pub fn add_with_request(this: &Cache, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = add ) ]
#[doc = "The `add()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/add)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn add_with_str(this: &Cache, request: &str) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = addAll ) ]
#[doc = "The `addAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/addAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn add_all_with_request_sequence(
this: &Cache,
requests: &::wasm_bindgen::JsValue,
) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = addAll ) ]
#[doc = "The `addAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/addAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn add_all_with_str_sequence(
this: &Cache,
requests: &::wasm_bindgen::JsValue,
) -> ::js_sys::Promise;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = delete ) ]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`*"]
pub fn delete_with_request(this: &Cache, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = delete ) ]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn delete_with_str(this: &Cache, request: &str) -> ::js_sys::Promise;
#[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = delete ) ]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`, `Request`*"]
pub fn delete_with_request_and_options(
this: &Cache,
request: &Request,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "CacheQueryOptions")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = delete ) ]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`*"]
pub fn delete_with_str_and_options(
this: &Cache,
request: &str,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn keys(this: &Cache) -> ::js_sys::Promise;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`*"]
pub fn keys_with_request(this: &Cache, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn keys_with_str(this: &Cache, request: &str) -> ::js_sys::Promise;
#[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`, `Request`*"]
pub fn keys_with_request_and_options(
this: &Cache,
request: &Request,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "CacheQueryOptions")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`*"]
pub fn keys_with_str_and_options(
this: &Cache,
request: &str,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`*"]
pub fn match_with_request(this: &Cache, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn match_with_str(this: &Cache, request: &str) -> ::js_sys::Promise;
#[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`, `Request`*"]
pub fn match_with_request_and_options(
this: &Cache,
request: &Request,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "CacheQueryOptions")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`*"]
pub fn match_with_str_and_options(
this: &Cache,
request: &str,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = matchAll ) ]
#[doc = "The `matchAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn match_all(this: &Cache) -> ::js_sys::Promise;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = matchAll ) ]
#[doc = "The `matchAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`*"]
pub fn match_all_with_request(this: &Cache, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = matchAll ) ]
#[doc = "The `matchAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`*"]
pub fn match_all_with_str(this: &Cache, request: &str) -> ::js_sys::Promise;
#[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = matchAll ) ]
#[doc = "The `matchAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`, `Request`*"]
pub fn match_all_with_request_and_options(
this: &Cache,
request: &Request,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "CacheQueryOptions")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = matchAll ) ]
#[doc = "The `matchAll()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `CacheQueryOptions`*"]
pub fn match_all_with_str_and_options(
this: &Cache,
request: &str,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(all(feature = "Request", feature = "Response",))]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = put ) ]
#[doc = "The `put()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/put)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Request`, `Response`*"]
pub fn put_with_request(
this: &Cache,
request: &Request,
response: &Response,
) -> ::js_sys::Promise;
#[cfg(feature = "Response")]
# [ wasm_bindgen ( method , structural , js_class = "Cache" , js_name = put ) ]
#[doc = "The `put()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Cache/put)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Cache`, `Response`*"]
pub fn put_with_str(this: &Cache, request: &str, response: &Response) -> ::js_sys::Promise;
}

View File

@ -0,0 +1,89 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CacheBatchOperation ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CacheBatchOperation` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
pub type CacheBatchOperation;
}
impl CacheBatchOperation {
#[doc = "Construct a new `CacheBatchOperation`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(feature = "CacheQueryOptions")]
#[doc = "Change the `options` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"]
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
}
#[cfg(feature = "Request")]
#[doc = "Change the `request` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"]
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
}
#[cfg(feature = "Response")]
#[doc = "Change the `response` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"]
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
}
#[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
}
}

View File

@ -0,0 +1,90 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CacheQueryOptions ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CacheQueryOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub type CacheQueryOptions;
}
impl CacheQueryOptions {
#[doc = "Construct a new `CacheQueryOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `cacheName` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
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
}
#[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
}
#[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
}
#[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
}
}

View File

@ -0,0 +1,81 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CacheStorage , typescript_type = "CacheStorage" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CacheStorage` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub type CacheStorage;
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = delete ) ]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub fn delete(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = has ) ]
#[doc = "The `has()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/has)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub fn has(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = keys ) ]
#[doc = "The `keys()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/keys)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub fn keys(this: &CacheStorage) -> ::js_sys::Promise;
#[cfg(feature = "Request")]
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`, `Request`*"]
pub fn match_with_request(this: &CacheStorage, request: &Request) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub fn match_with_str(this: &CacheStorage, request: &str) -> ::js_sys::Promise;
#[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`, `CacheStorage`, `Request`*"]
pub fn match_with_request_and_options(
this: &CacheStorage,
request: &Request,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
#[cfg(feature = "CacheQueryOptions")]
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = match ) ]
#[doc = "The `match()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`, `CacheStorage`*"]
pub fn match_with_str_and_options(
this: &CacheStorage,
request: &str,
options: &CacheQueryOptions,
) -> ::js_sys::Promise;
# [ wasm_bindgen ( method , structural , js_class = "CacheStorage" , js_name = open ) ]
#[doc = "The `open()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
pub fn open(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
}

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `CacheStorageNamespace` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CacheStorageNamespace`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CacheStorageNamespace {
Content = "content",
Chrome = "chrome",
}

View File

@ -0,0 +1,29 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = MediaStream , extends = EventTarget , extends = :: js_sys :: Object , js_name = CanvasCaptureMediaStream , typescript_type = "CanvasCaptureMediaStream" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CanvasCaptureMediaStream` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasCaptureMediaStream`*"]
pub type CanvasCaptureMediaStream;
#[cfg(feature = "HtmlCanvasElement")]
# [ wasm_bindgen ( structural , method , getter , js_class = "CanvasCaptureMediaStream" , js_name = canvas ) ]
#[doc = "Getter for the `canvas` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStream/canvas)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasCaptureMediaStream`, `HtmlCanvasElement`*"]
pub fn canvas(this: &CanvasCaptureMediaStream) -> HtmlCanvasElement;
# [ wasm_bindgen ( method , structural , js_class = "CanvasCaptureMediaStream" , js_name = requestFrame ) ]
#[doc = "The `requestFrame()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStream/requestFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasCaptureMediaStream`*"]
pub fn request_frame(this: &CanvasCaptureMediaStream);
}

View File

@ -0,0 +1,21 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CanvasGradient , typescript_type = "CanvasGradient" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CanvasGradient` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasGradient`*"]
pub type CanvasGradient;
# [ wasm_bindgen ( catch , method , structural , js_class = "CanvasGradient" , js_name = addColorStop ) ]
#[doc = "The `addColorStop()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient/addColorStop)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasGradient`*"]
pub fn add_color_stop(this: &CanvasGradient, offset: f32, color: &str) -> Result<(), JsValue>;
}

View File

@ -0,0 +1,22 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CanvasPattern , typescript_type = "CanvasPattern" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CanvasPattern` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasPattern`*"]
pub type CanvasPattern;
#[cfg(feature = "SvgMatrix")]
# [ wasm_bindgen ( method , structural , js_class = "CanvasPattern" , js_name = setTransform ) ]
#[doc = "The `setTransform()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern/setTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `SvgMatrix`*"]
pub fn set_transform(this: &CanvasPattern, matrix: &SvgMatrix);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `CanvasWindingRule` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CanvasWindingRule {
Nonzero = "nonzero",
Evenodd = "evenodd",
}

View File

@ -0,0 +1,16 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
#[doc = "The `CaretChangedReason` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CaretChangedReason {
Visibilitychange = "visibilitychange",
Updateposition = "updateposition",
Longpressonemptycontent = "longpressonemptycontent",
Taponcaret = "taponcaret",
Presscaret = "presscaret",
Releasecaret = "releasecaret",
Scroll = "scroll",
}

View File

@ -0,0 +1,37 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = CaretPosition , typescript_type = "CaretPosition" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CaretPosition` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretPosition`*"]
pub type CaretPosition;
#[cfg(feature = "Node")]
# [ wasm_bindgen ( structural , method , getter , js_class = "CaretPosition" , js_name = offsetNode ) ]
#[doc = "Getter for the `offsetNode` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/offsetNode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretPosition`, `Node`*"]
pub fn offset_node(this: &CaretPosition) -> Option<Node>;
# [ wasm_bindgen ( structural , method , getter , js_class = "CaretPosition" , js_name = offset ) ]
#[doc = "Getter for the `offset` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/offset)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretPosition`*"]
pub fn offset(this: &CaretPosition) -> u32;
#[cfg(feature = "DomRect")]
# [ wasm_bindgen ( method , structural , js_class = "CaretPosition" , js_name = getClientRect ) ]
#[doc = "The `getClientRect()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition/getClientRect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CaretPosition`, `DomRect`*"]
pub fn get_client_rect(this: &CaretPosition) -> Option<DomRect>;
}

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