New issue
Advanced search Search tips

Issue 869910 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 583586
Owner: ----
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 866274


Participants' hotlists:
document.open


Sign in to add a comment

document.open() should be be a no-op when called from `beforeunload`, `pagehide`, and `unload` event listeners

Project Member Reported by timothygu@chromium.org, Aug 1

Issue description

Chrome Version: 70.0.3508.0 (Official Build) canary (64-bit)
OS: macOS 10.13.6

What steps will reproduce the problem?

https://github.com/web-platform-tests/wpt/blob/master/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js

What is the expected result?

The linked test pass and the document.open() call is ignored. The document open steps in HTML [1] has as its step 6:

6. Similarly, if document's ignore-opens-during-unload counter [2] is greater than 0, then return document.

   Note: This basically causes document.open(type, replace) to be ignored when it's called from a beforeunload, pagehide, or unload event handler while the Document is being unloaded.

Both Firefox and Safari implement this.

What happens instead?

The test fails, as the document.open() call functions normally.

[1]: https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-open-steps
[2]: https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#ignore-opens-during-unload-counter

 
Mergedinto: 583586
Status: Duplicate (was: Available)

Sign in to add a comment