- From: Robin Berjon <robin@berjon.com>
- Date: Thu, 30 Jun 2011 14:21:48 +0200
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Webapps WG <public-webapps@w3.org>
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
Received on Thursday, 30 June 2011 12:22:13 UTC