W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: [DOM3Events] Use cases for Mutation Events

From: João Eiras <joaoe@opera.com>
Date: Thu, 04 Jun 2009 14:01:41 +0200
To: "Jonas Sicking" <jonas@sicking.cc>
Cc: "Sergey Ilinsky" <castonet@yahoo.co.uk>, "Webapps WG" <public-webapps@w3.org>
Message-ID: <op.uuz003io2q99of@id-c0981>

>> Use cases:
>>  - user triggered input, like when using contentEditable/designMode
> We should fix this by adding better events for user input into
> contentEditable/designMode. Using mutation events for this is both
> unnecessarily hard to use (I'd imagine), as well as unperformant (for
> sure).

I agree 100% that we need better events for user input in this regard, but we don't have them currently and Gecko and Webkit dispatch mutation events for user input on editable documents, and I know of a few high profile project that use them (although I can't disclose which).

> Can you explain these more in detail?

Whether there are libraries that use them or not, I honestly can't tell. However there are scenarios where 3rd party libraries like jQuery or prototype might require to know if the document has mutated to update their internal data structures.
For the 3rd party scripts, it's quite common for sites to deploy 3rd party scripts that embed links to social networking sites, bookmarking services, embedding ads, embedding videos, etc. If somehow the script breaks the main page's tree, a mutation event could help, although in these cases, probably the load events would be good enough.
Received on Thursday, 4 June 2009 12:02:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:54 UTC