DOM 2 Event question...

In mainting compatibility with HTML 4.0 event listeners, the spec says:

"In order to achieve compatibility with HTML 4.0, implementors may view the
settings of attributes which represent event handlers as the creation and
registration of an EventListener on the Node.  The value of useCapture
defaults to false.  This EventListener behaves in the same manner as any
other EventListeners which may be registered on the EventTarget."

If the EventListener behaves in the same manner as any other EventListener,
then is the attribute which represents the event handler expected to point
to an object inmplementing the EventTarget interface (as opposed to a
function)?

ie, in HTML 4.0, I just put:  <BUTTON onclick="alert('foo')">

with the new DOM 2 spec, would it look something like this?

<BUTTON onclick="myEventHandler">

where 'myEventHandler' implements the event target interface?  This isn't
backwards compatibility, and I just want to make sure that I understand the
spec correctly.

Thanks,

Sam Christiansen
Trilogy Software

Received on Thursday, 22 June 2000 12:04:30 UTC