Join GitHub today
No longer remove tasks for document.open() #3665
The actual current task-removal behavior is actually pretty subtle, as many queued tasks are for firing events, and
Here's a collection of tests I've developed for this issue (those starting with "step-14") and their results on each browser.
Chrome 69.0.3488.0 (Official Build) canary (64-bit)
Safari Tech Preview Release 60 (Safari 12.0, WebKit 13606.1.23.1)
Firefox Nightly 63.0a1 (2018-07-11) (64-bit)
Microsoft Edge 42.17134.1.0
(event) = observation is done through event listeners added to non-nodes before document.open()
Then there are a few tests with questionable value to this specific issue as they may be affected by other implementation differences.
(Window event) = observation is done through event listeners added to impacted Window before
The last row's proposal is in conjunction with the resolution from #3818 to remove event listeners on the
Blink and WebKit do not remove any tasks in
Gecko does not remove most tasks but removes some tasks (timers and marquee's
Edge isn't observed to allow any task to remain execution except for
In conclusion, I propose we adopt the current behavior of Chrome and Safari, which is twofold:
The WPT PR (web-platform-tests/wpt#10818) has been appropriately updated to reflect these proposed changes.
Yeah, I agree that it is a very odd behavior. However, that's more or less what Firefox is doing right now for some tasks, and I agree with @annevk that the easiest way to interoperability is to remove both of these clauses.
I understand that it can be difficult to look at each proposed change to
Yeah, I tried to make a lot of tasks abort for document.open() when I was cleaning up FF's global teardown code, but I was told we couldn't due to web compat issues. It's super weird.
I guess I was just trying to say fixing this issue needs to be done in coordination with changing the global behavior to make sense in the spec.