On Jun 4, 2009, at 12:07 , Jonas Sicking wrote: > Here's an API that might work: > > The following methods are added to the Document, Element and > DocumentFragment interfaces: > > addAttributeChangedListener(NodeDataCallback); > addSubtreeAttributeChangedListener(NodeDataCallback); > addChildlistChangedListener(NodeDataCallback); > addSubtreeChangedListener(NodeDataCallback); > addTextDataChangedListener(NodeDataCallback); > removeAttributeChangedListener(NodeDataCallback); > removeSubtreeAttributeChangedListener(NodeDataCallback); > removeChildlistChangedListener(NodeDataCallback); > removeSubtreeChangedListener(NodeDataCallback); > removeTextDataChangedListener(NodeDataCallback);
Just a thought: I wonder if it might be interesting to also support: addClassListChangedListener(NodeDataCallback) addSubtreeClassListChangedListener(NodeDataCallback) removeClassListChangedListener(NodeDataCallback) removeSubtreeClassListChangedListener(NodeDataCallback) ? I assume that you could get the same information with the Attribute variants, but with more noise (and if using SVG, with a lot more noise). I'll admit that I haven't thought this through properly, but the thought popped up because class changes is overwhelmingly what I find myself wanting to be notified of most often. -- Robin Berjon - http://berjon.com/ - @robinberjon