W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

DOM Level 2: EventTargets and Nodes

From: Steve Ball <Steve.Ball@zveno.com>
Date: Wed, 29 Mar 2000 10:50:58 -0500
Message-ID: <38E22662.A57D7C08@zveno.com>
To: www-dom@w3.org
I'm currently undertaking an implementation of the
proposed DOM L2 UI Event spec for TclDOM - 
the Tcl language binding for the DOM.

It all looks fairly straight-forward, except for
one thing: how is an Event Listener associated with
a particular node?  Specifically, an EventTarget?  

The spec says:
"The EventTarget interface is implemented by all Nodes 
in an implementation...".  However, EventTarget does
not derive from Node, and there are no methods to
create an association.  For Level 2, is this something
extra that must be provided by the implementation?

I can see how an EventListener is associated with
an EventTarget (via addEventListener).  The Event
interface has a field for the current node, which
I suppose could be initialised to a particular
node before calling dispatchEvent.  I just can't
see the coupling of a Node to an EventTarget.

Please illuminate me!

Steve Ball

Steve Ball            |   Swish XML Editor    | Training & Seminars
Zveno Pty Ltd         |   Web Tcl Complete    |      XML XSL
http://www.zveno.com/ |    TclXML TclDOM      | Tcl, Web Development
Steve.Ball@zveno.com  +-----------------------+---------------------
Ph. +61 2 6242 4099   | Mobile (0413) 594 462 | Fax +61 2 6242 4099
Received on Tuesday, 28 March 2000 19:37:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC