Delay iframe and script element processing until the DOM is stable.

This commit is contained in:
Josh Matthews 2018-12-09 23:52:42 -05:00
parent 14b0de30db
commit fc2d810bce
4 changed files with 59 additions and 21 deletions

View file

@ -777,7 +777,10 @@ impl VirtualMethods for HTMLScriptElement {
}
if tree_in_doc && !self.parser_inserted.get() {
self.prepare();
let script = Trusted::new(self);
document_from_node(self).add_delayed_task(task!(ScriptDelayedInitialize: move || {
script.root().prepare();
}));
}
}