Hi all,
I wanted to provide a suggested work item for predictability folks. I'm not sure on its priority, but I wanted to get it on your radar and hear what you thought.
Right now the HTML Standard has a model for document.open() which replaces the Window object. However, only Firefox matches this spec. All other browsers have a different model, which does various things to "reset" the Window object without actually replacing it. (E.g., removing all event listeners.) This is summarized in
https://github.com/whatwg/html/issues/1698 . There are various other related issues; see
https://github.com/whatwg/html/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20document.open .
However, we haven't been willing to just switch the spec, as we don't have a good idea what other browsers do exactly, and whether it's aligned. So, this project would consist of:
* Surveying Edge, Blink, and WebKit, and finding out exactly what steps they carry out. Jochen gave a description for Blink in
https://github.com/whatwg/html/issues/1698#issuecomment-301795931.
* Deciding on a reasonable intersection
* Writing web platform tests for this intersection
* Updating the spec to follow this intersection
* Aligning Blink with any delta between the current behavior and the now-specced intersection behavior
Again, I'm not sure whether interop in this area is a huge real-world pain point for developers. But it's a pretty gnarly area of the spec that complicates a bunch of other stuff (by making it possible to have multiple windows for one document) and the reality-spec mismatch is troubling. So I wanted to see what predictability folks thought about this. I hope this is a reasonable use of the mailing list :)
-Domenic