mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Queue statechange event
This commit is contained in:
parent
7380f69f77
commit
97aa142993
1 changed files with 6 additions and 1 deletions
|
@ -183,7 +183,12 @@ impl BaseAudioContext {
|
||||||
this.fulfill_in_flight_resume_promises(|| {
|
this.fulfill_in_flight_resume_promises(|| {
|
||||||
if this.state.get() != AudioContextState::Running {
|
if this.state.get() != AudioContextState::Running {
|
||||||
this.state.set(AudioContextState::Running);
|
this.state.set(AudioContextState::Running);
|
||||||
this.upcast::<EventTarget>().fire_event(atom!("statechange"));
|
let window = DomRoot::downcast::<Window>(this.global()).unwrap();
|
||||||
|
window.dom_manipulation_task_source().queue_simple_event(
|
||||||
|
this.upcast(),
|
||||||
|
atom!("statechange"),
|
||||||
|
&window
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}), window.upcast());
|
}), window.upcast());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue