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

Re: Event handling

From: <keshlam@us.ibm.com>
Date: Thu, 16 Mar 2000 09:08:04 -0500
cc: "'www-dom@w3.org'" <www-dom@w3.org>
Message-ID: <852568A4.004DA0C3.00@D51MTA03.pok.ibm.com>
> The term "eventType" is used in at least three different places in the
> DOM-2 specification <...> with no additional comment that would specify
> the enumeration of valid strings with which the
> actual parameter 'type' can be assigned.

We allow you to invent your own events (eg, by creating your own
implementation of the Event interface) and pass them through the DOM event
distribution mechanism. And in fact, I don't think we prevent you from
extending the existing event classes by simply generating events with
custom names.

It might be appropriate to encourage folks to manage the event-name space
as URIs or via reversed-domain-name prefixes or something of that sort, to
reduce the risk of collision.

> SECOND: In the JAVA language binding the language construct listening for

> an event is an object implementing a certain kind of interface.

The DOM event model uses a single interface for all event listeners. This
is different from Java's approach.

> ad C.
> The standard says "The EventTarget interface is implemented by all Nodes
> an implementation
> which supports the DOM Event"

The intent is that a single object implement both interfaces:

     class MyNodeImplementation implements Node, EventTarget {}

Joe Kesselman  / IBM Research
Received on Thursday, 16 March 2000 09:08:23 UTC

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