Closed Bug 1456313 Opened 7 years ago Closed 6 years ago

Behavior for document.open and new window global (Consider matching Blink/WebKit)

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

57 Branch
Unspecified
Android
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1489308
Tracking Status
firefox61 --- affected

People

(Reporter: karlcow, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webcompat:p3])

This bug is here to mainly track webcompat issues we have related to sites using document.write and breaking the user experience (while it is working on Chrome/Safari). Firefox is implementing what the specification currently says. This was for example documented in this blog post. https://miketaylr.com/posts/2014/08/document-writing-zeptos.html There is an issue currently opened on WHATWG html about it https://github.com/whatwg/html/issues/1698 There is also a chromium bug which is expressing that they want to change the specification. https://bugs.chromium.org/p/chromium/issues/detail?id=149785#c15 > We might want to WontFix this, or at least de-prioritize. > In https://github.com/whatwg/html/issues/1698 we're talking > about changing the spec to match WebKit/Blink's model, > which is significantly simpler and helps avoid 1:2 document:Window models > (which causes a variety of other spec problems).
Flags: webcompat?
Technically a duplicate of bug 1449992, but this contains more information...
Flags: webcompat? → webcompat+
Whiteboard: [webcompat] → [webcompat:p3]

In-production Mobify powered sites also use document.write trickery, and rely on Chrome's behavior here. They essentially use this pattern to re-load the document, even after the document's readyState is interactive:

setTimeout(function() {
  x.open("text/html", "replace");
  x.write(w);
  x.close()
})

This of course leads to related breakage, as seen in https://webcompat.com/issues/23246

Blocks: mobify

We should just fix bug 1489308 which has spec links and the rest. Pretty sure that will fix this bug.

Depends on: 1489308

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #3)

We should just fix bug 1489308 which has spec links and the rest. Pretty sure that will fix this bug.

Cool, let's dupe this (and try to remember to test the broken sites when Bug 1489308 is fixed).

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

and try to remember to test the broken sites

As long as you do the remembering... ;) That's why I had left this open, as a reminder.

heh, fair. let's ask bugzilla to help.

Flags: needinfo?(miket)

I've tested the dupes, and re-opened 2 bugs that weren't fixed (likely viewport interop issues).

Flags: needinfo?(miket)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.