Join GitHub today
document.open() and the load event #10239
@bzbarsky I tried to figure out what browsers do with the load event because of your comments in #10209 and I'm not much wiser. This test passes in Safari and fails everywhere else (it fails in Firefox because Firefox loses the written content; it fails in Chrome and Edge because they dispatch a normal load event on the window).
I did notice that Chrome has some logic for the load event here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/Document.cpp?l=3031. And indeed if I don't wait for the
It fails in Firefox because
Furthermore, as the test is written right now, the