W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Mutation events replacement

From: David Flanagan <dflanagan@mozilla.com>
Date: Wed, 20 Jul 2011 22:47:34 -0700
Message-ID: <4E27BD76.10708@mozilla.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Ryosuke Niwa <rniwa@webkit.org>, public-webapps <public-webapps@w3.org>
On 7/20/11 7:17 PM, Boris Zbarsky wrote:
> On 7/20/11 4:14 PM, Ryosuke Niwa wrote:
>> I'm not sure if we can have a concept of atomicity in DOM.  Boris might
>> have a strong opinion on this.
> I don't yet.
> What I do have a strong opinion on is that it would be good to have 
> some data on how common "move" operations are compared to "remove" and 
> "insert" on the web.  Then we'll at least know how common or edge-case 
> the situation is and hence how much effort we should spend on 
> optimizing for it...
> -Boris
I agree that it would be good to have data.  All I have is the intuition 
that moves in the form of reparenting elements is fairly common.  I 
assume that there is a lot of code out there that dynamically decorates 
static content (to add hyperlinks, animation, etc.) by reparenting that 
content into a container element using some variation on this basic code:

     var container = document.createElement('div');
     parent.insertBefore(container, target);

But you're right that this might be an edge case that is not worth 
optimizing.  If "reparent" events are treated as a new category of 
mutation events, then they can be added later, if needed, since Jonas's 
proposal allows for that sort of extension.

Received on Thursday, 21 July 2011 05:48:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:22 UTC