Noticing, as when Netscape topped around 80%, and then IE passed 80 on way to 95%, and now with Chrome: when a browser gets 80% market power, esp. with leading devtools so web devs live in it, content interop suffers. Not rationalizing or excusing; it is bad _per se_. Real, too.
13
49
3
110
Cc: @bz_moz @davidbaron who probably know at a glance what's up.
1
1
var f = document.createElement('iframe') var loaded = false; var t = ""; f.addEventListener('load', () => { loaded = true; }) t += `${loaded},`; document.body.appendChild(f) t += `${loaded},`; setTimeout(() => { t += `${loaded}`; console.log(t); }, 100);
1
1
I think the above code shows the difference more clearly: * logs "false,false,true" in Firefox * logs "false,true,true" in Chrome My guess is this has to do with synchronous vs asynchronous loading of contents of empty iframes? That's a question for @hsivonen.

Feb 3, 2018 · 6:41 PM UTC

2
1
Nesting an event handler call (mutating var loaded & of course the DOM) without nesting an event loop (_verboten_, could vary all invariants) seems irregular. Security vulns have exploited similar unexpected nesting. Cc: @natashenka
1
2
3
Without actually debugging this, I'd expect Gecko's load event to come from a parsed about:blank instead of the synthetic one. In any case, allowing the load event sometimes synchronous in Chrome seems like trouble.
1
7