W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

Re: [DOM Level 3 Events] optionality of the capture argument in addEventListener/removeEventListener

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 1 Oct 2010 16:10:46 -0700
Message-ID: <AANLkTinhSjm9Wcj0Zjoc5=MHxYt+jKVqKedF-r9Sda2z@mail.gmail.com>
To: Garrett Smith <dhtmlkitchen@gmail.com>
Cc: Anne van Kesteren <annevk@opera.com>, Charles Pritchard <chuck@jumis.com>, Sergey Ilinsky <sergey@ilinsky.com>, www-dom@w3.org
On Fri, Oct 1, 2010 at 1:04 PM, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> On 9/25/10, Anne van Kesteren <annevk@opera.com> wrote:
>> On Fri, 24 Sep 2010 23:00:37 +0200, Charles Pritchard <chuck@jumis.com>
>> wrote:
>>> There are many cases where leaving out that required 3rd argument
>>> just fails miserably.
>>> Wish it weren't so. Afaik, it'll definitely break things.
>> In the short term, sure. In the long term all browsers will support it. We
>> should definitely make this change.
> In the short term, new tutorials may be written saying that it is
> optional and authors will follow those guides, causing
> interoperability problems for older browsers.
> That's the bad. The good is the long term scenario of having a
> slightly cleaner API and resultant code (that doesn't need the extra
> param).
> I'd like to see a little warning in the spec, something along the lines of:
> useCapture -
>  [description]
>  If omitted, the behavior is the same as if `false` had been supplied.
> Note that `useCapture` was required in previous versions of the
> specification and omitting it will result in an error in older
> implementations. Authors should therefore continue to supply a value
> for `useCapture` until implementations support its omission.

A warning to this effect seems reasonable to me.

/ Jonas
Received on Friday, 1 October 2010 23:40:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:16 UTC