mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add microtask checkpoints on </script> and CE construct
This commit is contained in:
parent
2373769e76
commit
c725f9e84d
6 changed files with 37 additions and 31 deletions
|
@ -558,6 +558,19 @@ impl ServoParser {
|
|||
Err(script) => script,
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#parsing-main-incdata
|
||||
// branch "An end tag whose tag name is "script"
|
||||
// The spec says to perform the microtask checkpoint before
|
||||
// setting the insertion mode back from Text, but this is not
|
||||
// possible with the way servo and html5ever currently
|
||||
// relate to each other, and hopefully it is not observable.
|
||||
if is_execution_stack_empty() {
|
||||
self.document
|
||||
.window()
|
||||
.upcast::<GlobalScope>()
|
||||
.perform_a_microtask_checkpoint();
|
||||
}
|
||||
|
||||
let script_nesting_level = self.script_nesting_level.get();
|
||||
|
||||
self.script_nesting_level.set(script_nesting_level + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue