document.open() should be be a no-op when called from `beforeunload`, `pagehide`, and `unload` event listeners |
|
Issue descriptionChrome 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 |
|
►
Sign in to add a comment |
|
Comment 1 by timothygu@chromium.org
, Aug 3Status: Duplicate (was: Available)