W3C home > Mailing lists > Public > public-device-apis@w3.org > March 2012

Re: addEventListener and side effects (was: CfC to change Sensor approach, not progress current draft)

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Mon, 26 Mar 2012 11:43:42 +0200
Message-ID: <1332755022.5062.23.camel@altostratustier>
To: Doug Turner <doug.turner@gmail.com>
Cc: Robin Berjon <robin@berjon.com>, Frederick.Hirsch@nokia.com, public-device-apis@w3.org
Le jeudi 22 mars 2012 à 10:27 -0700, Doug Turner a écrit :
> On Mar 22, 2012, at 10:20 AM, Dominique Hazael-Massieux wrote:
> > Le jeudi 22 mars 2012 à 10:09 -0700, Doug Turner a écrit :
> >> I am worried about consistency.
> > 
> > I agree that consistency is important; but between consistency and doing
> > the right thing, I think the latter takes precedence.
> 
> I don't think I agree as the 'right thing' isn't defined.  Sorry.

I've pointed at a discussion showing that at least the HTML5 editor and
the DOM Level 4 editor thought that having side-effects to
addEventListener was not the right thing.

> > I'm all for striving for consistency when two equivalent
> > solutions exist, but if the addEventListener-with-side-effect is
> > considered an inferior solution, I don't think we should push
> > consistency with that approach.
> 
> I hope it is clear that I do not think
> addEventListener-with-side-effect is an inferior solution.  So, this
> is really the gist of our argument, isn't it?

It is (if you ignore my point about accuracy).

Now, if you're correct that it is not an inferior solution, I'm all for
going your way: it's simpler, and more consistent with an existing
well-deployed API.

But I think it would be useful to get confirmation from others that it
is indeed not inferior: it would be a waste of time to invest energy in
something that has been pointed as problematic in other contexts.

Dom
Received on Monday, 26 March 2012 09:49:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:53 UTC