-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No longer remove tasks for document.open() #3665
Conversation
This is not consistently implemented and given that Firefox does not appear to do it at all I hope we can get away without it. Tests: web-platform-tests/wpt#10818.
I haven't heard about or considered that behavior before, so couldn't say if it's intentional or accidental. But if it's tested it shouldn't regress :) |
@foolip regress? |
I mean that if we spec the "remove message" behavior and it's just accidental in Chrome, then as long as there's a test for the behavior it won't regress to some non-spec behavior. |
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. Version infoChrome 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 ✅ = task still observable (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. |
Wouldn't this change depend on also changing the spec to keep the original global and not create a new global? It seems odd to say tasks should be run for a global that has been removed. |
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. |
Based on the work by Anne van Kesteren in whatwg#3651, but without the parts concerning the session history. Changes to that area will come later (see whatwg#3818). Tests: web-platform-tests/wpt#10773 Tests: web-platform-tests/wpt#10778 Tests: web-platform-tests/wpt#10789 Tests: web-platform-tests/wpt#10815 Tests: web-platform-tests/wpt#10818 Fixes whatwg#1698. Fixes whatwg#3286. Fixes whatwg#3306. Closes whatwg#3665. Co-authored-by: Anne van Kesteren <[email protected]>
Based on the work by Anne van Kesteren in whatwg#3651, but without the parts concerning the session history. Changes to that area will come later (see whatwg#3818). Tests: web-platform-tests/wpt#10773 Tests: web-platform-tests/wpt#10778 Tests: web-platform-tests/wpt#10815 Tests: web-platform-tests/wpt#10818 Fixes whatwg#1698. Fixes whatwg#3286. Fixes whatwg#3306. Closes whatwg#3665. Co-authored-by: Anne van Kesteren <[email protected]>
In particular, removes the realm creation, document unloading, and tasks removal steps. Based on the work by Anne van Kesteren in #3651, but without the parts concerning the session history. Changes to that area will come later (see #3818). These changes allow us to remove several auxiliary concepts that only existed to support document.open(): - The recycle parameter to the "unload a Document" algorithm - The window parameter to the "set the active document" algorithm Tests: web-platform-tests/wpt#10773 Tests: web-platform-tests/wpt#10778 Tests: web-platform-tests/wpt#10815 Tests: web-platform-tests/wpt#10818 Fixes #1698. Fixes #3286. Fixes #3306. Closes #3665.
In particular, removes the realm creation, document unloading, and tasks removal steps. Based on the work by Anne van Kesteren in whatwg#3651, but without the parts concerning the session history. Changes to that area will come later (see whatwg#3818). These changes allow us to remove several auxiliary concepts that only existed to support document.open(): - The recycle parameter to the "unload a Document" algorithm - The window parameter to the "set the active document" algorithm Tests: web-platform-tests/wpt#10773 Tests: web-platform-tests/wpt#10778 Tests: web-platform-tests/wpt#10815 Tests: web-platform-tests/wpt#10818 Fixes whatwg#1698. Fixes whatwg#3286. Fixes whatwg#3306. Closes whatwg#3665.
In particular, removes the realm creation, document unloading, and tasks removal steps. Based on the work by Anne van Kesteren in whatwg#3651, but without the parts concerning the session history. Changes to that area will come later (see whatwg#3818). These changes allow us to remove several auxiliary concepts that only existed to support document.open(): - The recycle parameter to the "unload a Document" algorithm - The window parameter to the "set the active document" algorithm Tests: web-platform-tests/wpt#10773 Tests: web-platform-tests/wpt#10778 Tests: web-platform-tests/wpt#10815 Tests: web-platform-tests/wpt#10818 Fixes whatwg#1698. Fixes whatwg#3286. Fixes whatwg#3306. Closes whatwg#3665.
This is not consistently implemented and given that Firefox does not appear to do it at all I hope we can get away without it.
Tests: web-platform-tests/wpt#10818.
/dynamic-markup-insertion.html ( diff )