Skip to content
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

Merged
merged 3 commits into from
Sep 4, 2018

Conversation

TimothyGu
Copy link
Member

@TimothyGu TimothyGu commented Aug 30, 2018

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 )

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: …
@TimothyGu TimothyGu added needs tests Moving the issue forward requires someone to write tests interop Implementations are not interoperable with each other topic: document.open() labels Aug 30, 2018
Copy link
Member

@domenic domenic left a 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.

Copy link
Member

@domenic domenic left a 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.

TimothyGu added a commit to web-platform-tests/wpt that referenced this pull request Aug 30, 2018
@TimothyGu TimothyGu removed the needs tests Moving the issue forward requires someone to write tests label Aug 30, 2018
@domenic domenic merged commit ad541d6 into whatwg:master Sep 4, 2018
@TimothyGu TimothyGu deleted the document-open-nonactive branch September 4, 2018 20:19
TimothyGu added a commit to web-platform-tests/wpt that referenced this pull request Sep 4, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Sep 10, 2018
…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
jankeromnes pushed a commit to jankeromnes/gecko that referenced this pull request Sep 10, 2018
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: document.open()
Development

Successfully merging this pull request may close these issues.

2 participants