On Wed, Jun 20, 2012 at 12:36 AM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> On Tue, Jun 19, 2012 at 1:52 PM, Olli Pettay <Olli.Pettay@helsinki.fi>wrote:
>>
>> 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
>>> single task
>>> 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?
>
This doesn't seem very useful to me. Observing during page load will
clearly have a cost associated with it, and if you aren't notified until
DOMContentLoaded, you could have just listened for DOMContentLoaded
yourself, looked through the document for the stuff you care about, and
then attach an observer.
I'm not entirely opposed to notifying of parse-time mutations, but if we
did it seems like we'd want to deliver them during page load in some way.
- Adam