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

Re: Mutation events replacement

From: Dave Raggett <dsr@w3.org>
Date: Sat, 02 Jul 2011 11:28:35 +0100
Message-ID: <4E0EF2D3.6030106@w3.org>
To: public-webapps@w3.org
On 01/07/11 20:13, Boris Zbarsky wrote:
> > Similarly, I've found it important to
>> be able to distinguish between nodes that are being removed from a
>> document tree and nodes that are being moved within the document tree,
> Interesting, given that Gecko's DOM implementation does NOT make such 
> a distinction at the moment.  Why did you find this to be important?

My use case involves multiple people  simultaneously editing the same 
document. The mutations due to user actions are batched and serialized 
as JSON. If you know that a given node was moved then you can avoid the 
overhead of serializing a full description of its attributes and 
content, as is necessary when describing a node to be inserted.

If the browser is able to build a list of all the mutations involved in 
a given user action, this would presumably be more efficient than 
leaving this to web page scripts to do.

It is critically important to know what nodes have been inserted, 
removed, moved, or have had their attributes changed. If all you know is 
that some of the children have changed for a given node, the script has 
to do a lot of work to find out which have changed and in what manner, 
and this will probably involve keeping a local duplicate of the DOM tree 
at considerable cost.

The application uses web sockets for exchange of synchronization 
messages, and performs a near real time reconciliation of revisions to 
the document tree, based upon 3 way merges with one of the clients 
playing the role of senior editor when it comes to resolving conflicting 


  Dave Raggett<dsr@w3.org>  http://www.w3.org/People/Raggett
Received on Saturday, 2 July 2011 10:29:00 UTC

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