W3C home > Mailing lists > Public > www-svg@w3.org > January 2005

Re: DOM Level 3 events

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 18 Jan 2005 10:58:54 -0600
Message-ID: <41ED404E.1020608@mit.edu>
To: Jon Ferraiolo <jon.ferraiolo@adobe.com>
CC: Cameron McCormack <cam-www-svg@aka.mcc.id.au>, www-svg@w3.org

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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:29 GMT