mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add disconnect methods; cleanup DOM stuff (#2)
* Add disconnect methods * Use Dom, not DomRoot DomRoot will keep it permanently rooted, it should only be used in values not on the JS heap
This commit is contained in:
parent
23f7a73622
commit
f3bc183dba
4 changed files with 34 additions and 29 deletions
|
@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::OscillatorNodeBinding::{self, OscillatorOp
|
|||
use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorNodeMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::bindings::root::{Dom, DomRoot};
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_media::audio::context::AudioContext;
|
||||
|
@ -32,8 +32,8 @@ audio_param_impl!(Detune, OscillatorNode, OscillatorNodeMessage, SetDetune);
|
|||
pub struct OscillatorNode {
|
||||
source_node: AudioScheduledSourceNode,
|
||||
oscillator_type: OscillatorType,
|
||||
frequency: DomRoot<AudioParam>,
|
||||
detune: DomRoot<AudioParam>,
|
||||
frequency: Dom<AudioParam>,
|
||||
detune: Dom<AudioParam>,
|
||||
}
|
||||
|
||||
impl OscillatorNode {
|
||||
|
@ -70,8 +70,8 @@ impl OscillatorNode {
|
|||
OscillatorNode {
|
||||
source_node,
|
||||
oscillator_type: oscillator_options.type_,
|
||||
frequency,
|
||||
detune,
|
||||
frequency: Dom::from_ref(&frequency),
|
||||
detune: Dom::from_ref(&detune),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue