Skip to content

How should document.open handle the beforeunload handler tearing down the world? #3306

@bzbarsky

Description

@bzbarsky

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-open-steps step 2 checks for the document being an active document. Then step 10 runs arbitrary script, after which the document might not be active, the browsing context may not exist, etc. What should happen in this situation? Should the passed-in string still be parsed?

In Gecko I'm likely to add another active document check after step 10 and return document immediately if that fails, without doing any parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each otherneeds testsMoving the issue forward requires someone to write teststopic: document.open()

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions