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

Except the following looks like a typo:

<snip>
 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.
</snip>

*** should be EventListener.

Dominic

On Sun, Jul 31, 2011 at 9:15 AM, Rob Brackett <rbrackett@apple.com> wrote:

> Looks good to me. Thanks very much!
>
> -Rob
>
>
> On Jul 29, 2011, at 3:36 PM, Jacob Rossi wrote:
>
> > 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.
> >
> > Thanks,
> >
> > Jacob
> >
> > ================================================
> > From: Rob Brackett <rbrackett@apple.com>
> > Date: Wed, 29 Jun 2011 19:30:14 -0700
> > Cc: schepers@w3.org, Jonas Sicking <jonas@sicking.cc>, Cameron McCormack
> <cam@mcc.id.au>, Olli@pettay.fi, www-dom@w3.org
> > Message-id: <76EC7D43-D5A7-4768-BF1A-2AE925E4C541@apple.com>
> > To: Jacob Rossi <Jacob.Rossi@microsoft.com>
> >
> > 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?).
> >
> > Thanks!
> >
> > -Rob
> >
> >
>
>
>

Received on Saturday, 6 August 2011 20:30:13 UTC