Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-10-23 Thread Ian Hickson
On Thu, 30 Aug 2012, Olli Pettay wrote: The spec used to say DOM mutation events must not fire for changes caused by the UA parsing the document. I've updated this to also mention mutation observers. Why? Getting MutationObserver notifications during parsing is what I'd expect the

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-09-05 Thread Jonas Sicking
On Tue, Sep 4, 2012 at 10:11 PM, Elliott Sprehn espr...@gmail.com wrote: On Mon, Sep 3, 2012 at 8:45 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 3, 2012 at 1:24 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Aug 30, 2012 at 2:18 PM, Jonas Sicking jo...@sicking.cc wrote: ...

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-09-04 Thread Elliott Sprehn
On Mon, Sep 3, 2012 at 8:45 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 3, 2012 at 1:24 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Aug 30, 2012 at 2:18 PM, Jonas Sicking jo...@sicking.cc wrote: ... ... But I'm also not very worried about small differences in

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-09-03 Thread Anne van Kesteren
On Thu, Aug 30, 2012 at 2:18 PM, Jonas Sicking jo...@sicking.cc wrote: 1. We make sure to set all element attributes before inserting the element into the DOM. This to avoid sending notifications for attribute modifications. The element is inserted with the right set of attributes from the

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-09-03 Thread Jonas Sicking
On Mon, Sep 3, 2012 at 1:24 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Aug 30, 2012 at 2:18 PM, Jonas Sicking jo...@sicking.cc wrote: 1. We make sure to set all element attributes before inserting the element into the DOM. This to avoid sending notifications for attribute

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-30 Thread Rafael Weinstein
On Fri, Jun 29, 2012 at 6:14 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jun 29, 2012 at 8:25 PM, Adam Klein ad...@chromium.org wrote: On Fri, Jun 29, 2012 at 2:44 AM, Jonas Sicking jo...@sicking.cc wrote: All in all I think that as soon as we introduce exceptions to when

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-30 Thread Jonas Sicking
On Sat, Jun 30, 2012 at 5:56 PM, Rafael Weinstein rafa...@google.com wrote: On Fri, Jun 29, 2012 at 6:14 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jun 29, 2012 at 8:25 PM, Adam Klein ad...@chromium.org wrote: On Fri, Jun 29, 2012 at 2:44 AM, Jonas Sicking jo...@sicking.cc wrote: All

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-29 Thread Jonas Sicking
On Wed, Jun 27, 2012 at 3:31 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 06/26/2012 11:58 PM, Adam Klein wrote: On Wed, Jun 20, 2012 at 12:29 AM, Anne van Kesteren ann...@annevk.nl mailto:ann...@annevk.nl wrote:    On Tue, Jun 19, 2012 at 10:52 PM, Olli Pettay olli.pet...@helsinki.fi

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-29 Thread Adam Klein
On Fri, Jun 29, 2012 at 2:44 AM, Jonas Sicking jo...@sicking.cc wrote: All in all I think that as soon as we introduce exceptions to when MutationObserver callbacks fire we change the API from being a reliable way to track DOM mutations to a unreliable way where all callers have to be aware

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-29 Thread Jonas Sicking
On Fri, Jun 29, 2012 at 8:25 PM, Adam Klein ad...@chromium.org wrote: On Fri, Jun 29, 2012 at 2:44 AM, Jonas Sicking jo...@sicking.cc wrote: All in all I think that as soon as we introduce exceptions to when MutationObserver callbacks fire we change the API from being a reliable way to track

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-27 Thread Olli Pettay
On 06/26/2012 11:58 PM, Adam Klein wrote: On Wed, Jun 20, 2012 at 12:29 AM, Anne van Kesteren ann...@annevk.nl mailto:ann...@annevk.nl wrote: On Tue, Jun 19, 2012 at 10:52 PM, Olli Pettay olli.pet...@helsinki.fi mailto:olli.pet...@helsinki.fi wrote: end-of-microtask or end-of-task

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-26 Thread Adam Klein
On Wed, Jun 20, 2012 at 12:29 AM, Anne van Kesteren ann...@annevk.nlwrote: On Tue, Jun 19, 2012 at 10:52 PM, Olli Pettay olli.pet...@helsinki.fi wrote: end-of-microtask or end-of-task everywhere. And yes, some parsing / networking details may unfortunately be exposed, but in a way which

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-21 Thread Olli Pettay
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 mailto:olli.pet...@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

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Anne van Kesteren
On Tue, Jun 19, 2012 at 10:52 PM, Olli Pettay olli.pet...@helsinki.fi wrote: 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

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Ryosuke Niwa
On Tue, Jun 19, 2012 at 1:52 PM, Olli Pettay olli.pet...@helsinki.fiwrote: 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

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Olli Pettay
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 mailto:olli.pet...@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

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Adam Klein
On Wed, Jun 20, 2012 at 12:36 AM, Ryosuke Niwa rn...@webkit.org wrote: On Tue, Jun 19, 2012 at 1:52 PM, Olli Pettay olli.pet...@helsinki.fiwrote: 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

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Ryosuke Niwa
On Wed, Jun 20, 2012 at 1:33 PM, Adam Klein ad...@chromium.org wrote: On Wed, Jun 20, 2012 at 12:36 AM, Ryosuke Niwa rn...@webkit.org wrote: On Tue, Jun 19, 2012 at 1:52 PM, Olli Pettay olli.pet...@helsinki.fiwrote: Ojan points out that simply using end-of-task could expose low-level

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-20 Thread Bjoern Hoehrmann
* Jonas Sicking wrote: I can't think of any cases where you would *not* want these to fire for parser mutations. For example if you are building an XBL-like widget library which uses the DOM under a node to affect behavior or rendering of some other object. If you attach the widget before the

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-19 Thread Adam Klein
On Sun, Jun 17, 2012 at 12:17 PM, Ryosuke Niwa rn...@webkit.org wrote: On Sun, Jun 17, 2012 at 5:03 AM, Jonas Sicking jo...@sicking.cc wrote: On Sat, Jun 16, 2012 at 7:04 AM, Rafael Weinstein rafa...@google.com wrote: I too thought we had intentionally spec'd them to not fire during load.

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-19 Thread Olli Pettay
On 06/19/2012 11:37 PM, Adam Klein wrote: On Sun, Jun 17, 2012 at 12:17 PM, Ryosuke Niwa rn...@webkit.org mailto:rn...@webkit.org wrote: On Sun, Jun 17, 2012 at 5:03 AM, Jonas Sicking jo...@sicking.cc mailto:jo...@sicking.cc wrote: On Sat, Jun 16, 2012 at 7:04 AM, Rafael

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-17 Thread Jonas Sicking
On Sat, Jun 16, 2012 at 7:04 AM, Rafael Weinstein rafa...@google.com wrote: I too thought we had intentionally spec'd them to not fire during load. The HTML spec is clear about this WRT Mutation Events: http://www.whatwg.org/specs/web-apps/current-work/#tree-construction: DOM mutation

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-17 Thread Ryosuke Niwa
On Sun, Jun 17, 2012 at 5:03 AM, Jonas Sicking jo...@sicking.cc wrote: On Sat, Jun 16, 2012 at 7:04 AM, Rafael Weinstein rafa...@google.com wrote: I too thought we had intentionally spec'd them to not fire during load. The HTML spec is clear about this WRT Mutation Events:

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-17 Thread Olli Pettay
On 06/17/2012 03:03 PM, Jonas Sicking wrote: On Sat, Jun 16, 2012 at 7:04 AM, Rafael Weinstein rafa...@google.com wrote: I too thought we had intentionally spec'd them to not fire during load. The HTML spec is clear about this WRT Mutation Events:

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-17 Thread Olli Pettay
On 06/17/2012 10:17 PM, Ryosuke Niwa wrote: On Sun, Jun 17, 2012 at 5:03 AM, Jonas Sicking jo...@sicking.cc mailto:jo...@sicking.cc wrote: On Sat, Jun 16, 2012 at 7:04 AM, Rafael Weinstein rafa...@google.com mailto:rafa...@google.com wrote: I too thought we had intentionally spec'd

Re: Should MutationObservers be able to observe work done by the HTML parser?

2012-06-17 Thread Mihai Parparita
On Sun, Jun 17, 2012 at 10:22 PM, Olli Pettay olli.pet...@helsinki.fiwrote: That would be rather odd. If someone needs to process mutation records before normal delivery time, there is always takeRecords() In my example, I don't control the contents of the second script tag, so I can't use