Skip to content

Tracking issue for document.open() overhaul #3818

Closed

Description

@TimothyGu

This is a list of issues that currently surround document.open() interoperability. The list is tentative, and will most probably be extended in the future. For items in the list without dedicated issues or pull requests, I will be filing them individually in the future if need be.

The goal is for each listed issue to have extensive WPT coverage, as well as a confirmed resolution, either as a spec change or "known browser bug; will fix", or both. For now, the "resolution" present is what I believe to be the right path forward, and does not represent the final verdict.

The first checkbox represents if the resolution and tests have been completed. The second represents if the spec change has been submitted (or if it's not necessary).

Activity

  1. annevk commented on Jul 26, 2018

    @annevk
    Member

    @bzbarsky you probably want to review the above. With Ben leaving I suspect there's nobody else at the moment with a somewhat active interest in this?

  2. bzbarsky commented on Jul 27, 2018

    @bzbarsky
    Contributor

    Well, @hsivonen might have thoughts. And maybe @mystor, maybe. Are you sure @wanderview is not still interested? ;)

    I'm not quite clear on the event listeners thing. Firefox doesn't remove them from the old Window but does create a new Window, right? So the only way to trigger the listeners on the old Window is ... I'm not even quite sure what, actually.

  3. TimothyGu commented on Jul 27, 2018

    @TimothyGu
    MemberAuthor

    So the only way to trigger the listeners on the old Window is ... I'm not even quite sure what, actually.

    Yeah. That is precisely my point: if we can't trigger listeners on the old Window with Firefox right now, it is pretty much equivalent to if the event listeners were removed in the first place. (Well one can of course always fire synthetic events but that's different.)

  4. bzbarsky commented on Jul 27, 2018

    @bzbarsky
    Contributor

    Even with synthetic events... what would you fire them at, exactly?

  5. TimothyGu commented on Jul 27, 2018

    @TimothyGu
    MemberAuthor

    @bzbarsky The window as visible to the script that ran document.open()? Something like

    <script>
    window.addEventListener("myEvent", () => { parent.fired = true; });
    document.open();
    window.dispatchEvent(new Event("myEvent"));
    </script>

    in an iframe.

    But the bigger issue here seems to be that Firefox doesn't remove event listeners – on anything, not just the window object. See https://wpt.fyi/results/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.html, step 13 in the current spec, and web-platform-tests/wpt#12122.

  6. bzbarsky commented on Jul 27, 2018

    @bzbarsky
    Contributor

    window.dispatchEvent(new Event("myEvent"));

    Here "window" is the windowproxy, so would dispatch to the new window.

    Though it's possible that bareword dispatchEvent() might work, actually...

    But the bigger issue here seems to be that Firefox doesn't remove event listeners – on anything, not just the window object

    Yeah. We should probably change that...

  7. wanderview commented on Jul 28, 2018

    @wanderview
    Member

    Are you sure @wanderview is not still interested? ;)

    FWIW, I'm interested but probably unable to help much in the near future. Ramping up on other tasks, etc.

  8. 20 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions