Re: Subclassing DOM nodes

Yes, event handlers are another way of adding behavior to a node.

Note that you aren't limited to mutation events -- anything which conformed
to the Event interface can be dispatched through the DOM's event system. In
fact the example you use of a "Draw" event is almost certainly just such an
example; DrawEvent probably shouldn't be based on MutationEvent since it
doesn't represent a change made to the document's content or structure.

At this time there are no Creation Events. It's an interesting thought...
though I believe it could be done almost as easily by "wrappering" the
DOM's existing factory methods, which might actually be a cleaner solution.
If you really think Creation Events are better, I can be persuaded to add
them to the Open Issues List.

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 11 October 2000 15:11:44 UTC