On 06/20/2012 10:36 AM, Ryosuke Niwa wrote:
On Tue, Jun 19, 2012 at 1:52 PM, Olli Pettay <olli.pet...@helsinki.fi
Ojan points out
that simply using end-of-task could expose low-level implementation
detail of the parser to script (such as how much parsing is done in a
before the parser yields).
Does Firefox do anything special here? Or does it simply use the same
end-of-task delivery as everywhere else?
end-of-microtask or end-of-task everywhere. And yes, some parsing /
networking details may unfortunately be exposed, but in a way which should be
quite random. Web devs just can't really rely on network packages to be
delivered to parser in some exact way.
That randomness seems undesirable. Can we delay the delivery until
DOMContentLoaded is fired so that we can have more consisnte behavior here?
That prevents using MutationObserver for certain cases. Like when you "stream"
data using an iframe.
Also, there are already many cases when networking/parsing handling is exposed
to the web pages.
Just put any <img onload=".." onerror="...">. When the handlers run, the stuff after
the <img> may or may not be in the document.