Re: DOM Level 3 events

Jon Ferraiolo wrote:
> However, you can register an event listener using either name. Your 
> handler will get invoked no matter whether you listen to the "error" 
> event or the "SVGError" event. I would assume that, when your handler 
> receives the event object, the event name would match the name of the 
> event to which your event listener was listening. Thus, if you listened 
> for "SVGError", the event type on the event object would be "SVGError".

I'm not quite sure how this works...  It seems we're trying to maintain the 
following invariants here:

1)  The sme event object is passed to all the listeners involved
2)  The "type" is a property of the event object
3)  Different listeners see different types

So is the type supposed to by changed during event dispatch, then changed back? 
  This suggestion makes it impossible to simply alias the two event types to 
each other in the event implementation in the UA, which would be the most 
natural way of implementing two different names for the same event...

-Boris

Received on Tuesday, 18 January 2005 17:03:27 UTC