mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Clean up DOMManipulationTaskSource
This commit is contained in:
parent
bdecfa13d2
commit
05fc799f92
9 changed files with 33 additions and 19 deletions
|
@ -462,16 +462,12 @@ impl HTMLScriptElement {
|
|||
if external {
|
||||
self.dispatch_load_event();
|
||||
} else {
|
||||
let script_element = Trusted::new(self.upcast::<EventTarget>());
|
||||
let task_source = window.dom_manipulation_task_source();
|
||||
task_source.queue(DOMManipulationTask::FireSimpleEvent(atom!("load"), script_element)).unwrap();
|
||||
window.dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("load"));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn queue_error_event(&self) {
|
||||
let task_source = window_from_node(self).dom_manipulation_task_source();
|
||||
let script_element = Trusted::new(self.upcast::<EventTarget>());
|
||||
task_source.queue(DOMManipulationTask::FireSimpleEvent(atom!("error"), script_element)).unwrap();
|
||||
window_from_node(self).dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("error"));
|
||||
}
|
||||
|
||||
pub fn dispatch_before_script_execute_event(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue