Re: Functions that Implement the EventListener Interface (DOM Level 3 Events)

As promised, I have cleaned up the definition of "listener."  Since this editorial change shouldn't require implementation change (it was a combination of a typo and a clarification), I do not believe this change requires an additional last call. Let me know if this meets your satisfaction.



From: Rob Brackett <>
Date: Wed, 29 Jun 2011 19:30:14 -0700
Cc:, Jonas Sicking <>, Cameron McCormack <>,,
Message-id: <>
To: Jacob Rossi <>

On Jun 24, 2011, at 10:27 AM, Jacob Rossi wrote:

> Hi Rob,
> Sorry for a late reply. First, I completely agree that what's currently in the spec is just broken. The second paragraph is the intended spec'd behavior--the others need to be removed. 

Since it doesn't seem like there is much interest in changing the specified behavior, this is what I'd like to request as well. I think the following wording (or something similar) would be pretty good for the description of the "listener" parameter of the EventTarget interface's addEventListener() method:

The listener parameter must be either an object that implements the EventListener interface or a function. If listener is a function then it must be used as the callback for the event; otherwise, if listener implements EventTarget, then its handleEvent method must be used as the callback. If listener is a function that also has a handleEvent method, the function itself must be used as the callback and not its handleEvent method.

This is basically the same as the current second paragraph from the current spec. I've added one sentence at the end to make the use case in question as clear as possible since it does not seem like D3 Events is using attributes in its IDL (should attributes like [Callback] be used in D3 Events?).



Received on Friday, 29 July 2011 22:36:45 UTC