diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2018-08-23 15:31:13 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-08-24 12:22:19 -0700 |
commit | 062c1d607157028594f4133e997c8cdb6738ed7e (patch) | |
tree | 31116a12380e2bfc51dd91d7659cc7d9fec3858d /components/script/dom/baseaudiocontext.rs | |
parent | 43ea9e0e4a0d2fc5366f770a3c1f64f344268558 (diff) | |
download | servo-062c1d607157028594f4133e997c8cdb6738ed7e.tar.gz servo-062c1d607157028594f4133e997c8cdb6738ed7e.zip |
Add BaseAudioContext.createPanner()
Diffstat (limited to 'components/script/dom/baseaudiocontext.rs')
-rw-r--r-- | components/script/dom/baseaudiocontext.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs index f9487b17c7d..915f60a8e33 100644 --- a/components/script/dom/baseaudiocontext.rs +++ b/components/script/dom/baseaudiocontext.rs @@ -18,6 +18,7 @@ use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallba use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback; use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions; use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions; +use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions; use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::inheritance::Castable; use dom::bindings::num::Finite; @@ -28,6 +29,7 @@ use dom::domexception::{DOMErrorName, DOMException}; use dom::eventtarget::EventTarget; use dom::gainnode::GainNode; use dom::oscillatornode::OscillatorNode; +use dom::pannernode::PannerNode; use dom::promise::Promise; use dom::window::Window; use dom_struct::dom_struct; @@ -328,6 +330,12 @@ impl BaseAudioContextMethods for BaseAudioContext { GainNode::new(&self.global().as_window(), &self, &GainOptions::empty()) } + /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createpanner + fn CreatePanner(&self) -> DomRoot<PannerNode> { + PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty()) + } + + /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer fn CreateBuffer( &self, |