-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow document.open() to be called on non-active documents #3977
Conversation
There is no longer anything fundamental that prevents document.open() from being useful on non-active documents. This also aligns with Chrome, Edge, and Safari. In fact, several projects like AMP already utilize this property as a streaming HTML parser to desirable effects. Fixes whatwg#2827. Tests: web-platform-tests/wpt#12636 Tests: …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec changes LGTM, but looking forward to the tests especially on teasing out active vs. fully active, and the impact on those two guarded steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, whoops. document.write() will need similar changes.
…ocuments, a=testonly Automatic update from web-platform-testsdocument.open(): Test non-fully active documents (#12770) For whatwg/html#3977. -- wpt-commits: 61bc4ecc726596e5ce8634752e09a5e8a20e060f wpt-pr: 12770
…ocuments, a=testonly Automatic update from web-platform-testsdocument.open(): Test non-fully active documents (#12770) For whatwg/html#3977. -- wpt-commits: 61bc4ecc726596e5ce8634752e09a5e8a20e060f wpt-pr: 12770
…ocuments, a=testonly Automatic update from web-platform-testsdocument.open(): Test non-fully active documents (#12770) For whatwg/html#3977. -- wpt-commits: 61bc4ecc726596e5ce8634752e09a5e8a20e060f wpt-pr: 12770 UltraBlame original commit: d273278eecdf8fb4262cd2cd9b6f312e123c8b24
…ocuments, a=testonly Automatic update from web-platform-testsdocument.open(): Test non-fully active documents (#12770) For whatwg/html#3977. -- wpt-commits: 61bc4ecc726596e5ce8634752e09a5e8a20e060f wpt-pr: 12770 UltraBlame original commit: d273278eecdf8fb4262cd2cd9b6f312e123c8b24
…ocuments, a=testonly Automatic update from web-platform-testsdocument.open(): Test non-fully active documents (#12770) For whatwg/html#3977. -- wpt-commits: 61bc4ecc726596e5ce8634752e09a5e8a20e060f wpt-pr: 12770 UltraBlame original commit: d273278eecdf8fb4262cd2cd9b6f312e123c8b24
There is no longer anything fundamental that prevents
document.open()
from being useful on non-active documents. This also aligns with Chrome, Edge, and Safari. In fact, several projects like AMP already utilize this property as a streaming HTML parser to desirable effects.Additionally, use a more appropriate guard for erasing event listeners and handlers on the
Window
object, as revealed by the tests.Fixes #2827.
Tests: web-platform-tests/wpt#12636
Tests: web-platform-tests/wpt#12770
/dynamic-markup-insertion.html ( diff )