Mutation Events

Mutation Events


CHROME supports this ... but FF does not. same as IE8 .
http://www.w3.org/2003/02/06-dom-support.html
jQuery 1.5 perhaps ?
What I am actually talking is jQuery implementing support for
"Mutation Events" , which is DOM Level 2 ...
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-mutationevents
Mutation Events are actualy consequences of CRUDE operations on the
dom tree ...
This would allow $("div) that $("div").find(".subset").remove() has
happened.
For example :
var d1 = $("div") ; // .length === 10
// d1 is made by you
var d2 = $("div.foo") ; // subset of div's , length === 3
// imagine d2 was made inside some plugin out of your control, but on
the same page
d2.remove() ;
d1.length === 7 // because mutation event was fired (by dom itself)
and d1 "knows" what was removed
// optionaly one can could "get" the clones of removed nodes, if "one"
has subscribed to a Mutation Event
jQuery.subscribeToMutation( "REMOVE" , function ( mutation_event )
{ /* receive a mutation event upon removal of any dom node */});
Would this be just nice ?
Although I can see difficulties for this working in IE6 ;o)
--DBJ
--