W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

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

From: Jacob Rossi <rossi@gatech.edu>
Date: Wed, 29 Sep 2010 13:08:11 -0700
Message-ID: <AANLkTimLxjR4JTtkLmb8xgoLtnbdnJr9K1-hpPB89ymx@mail.gmail.com>
To: www-dom@w3.org, Olli Pettay <Olli.Pettay@helsinki.fi>, Jonas Sicking <jonas@sicking.cc>, Sergey Ilinsky <sergey@ilinsky.com>
> On 09/24/2010 11:48 PM, Jonas Sicking wrote:
> > On Fri, Sep 24, 2010 at 12:17 PM, Sergey Ilinsky<sergey@ilinsky.com>  wrote:
> >> There are modern browsers that made 3rd argument in the
> >> addEventListener/removeEventListener be optional. Is this a legal step?
> >> If I understand correctly, specification requires 3rd argument to be passed,
> >> thus the new behaviour not backed by the change
> >> in specification only destabilizes web as a platform.
> >> Personally, I like the behaviour, but cannot use it as long as not every
> >> browser does that.
> >
> > Currently it does not appear to be legal based on my reading of the
> > latest editor drafts. However I would love to change that. It wouldn't
> > be a big change in the spec, just stick [optional] in front of the
> > useCapture argument, and it should be no problem as far as backwards
> > compatibility goes. And at least in gecko it would be trivial to
> > implement.
> >
> > The only problem I can think of is that it means that people might
> > write pages that only works in newer browsers, however that is true
> > for any new feature added.
> >
> > / Jonas
> >
> >
> I don't support this kind of change.
> It happens way too often that people don't think about the phase, and
> that leads to bugs.
> -Olli

Neither do I.  Understanding Capture is too important to the event
system to be overlooked by developers. And while I'm all for enticing
users to run the leading edge version of their browser of choice,  I
see no good reason to not allow forward compatability of existing
browsers (where useCapture is required) with future sites that don't
provide this parameter.

Received on Wednesday, 29 September 2010 20:30:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:57 UTC