Re: Event handling

> 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
in
> 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