W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: Subclassing DOM nodes

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Wed, 11 Oct 2000 15:11:00 -0400
To: www-dom@w3.org
Message-ID: <OF7EB942E3.28B6424D-ON85256975.0068B8EF@pok.ibm.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT