W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

DOM 2 Event question...

From: <Sam.Christiansen@trilogy.com>
Date: Thu, 22 Jun 2000 10:52:14 -0500
To: www-dom@w3.org
Message-ID: <OF91BBC927.5B2DFB33-ON86256906.005634A2@trilogy.com>

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 GMT

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