W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2011

Re: currentTarget / observer

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Fri, 7 Jan 2011 10:50:14 -0800
Message-ID: <AANLkTikFYk3yjW-2oZ0RgEpKK15uo0e0jxW2YXis1qdR@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Gerd Wagner <wagnerg@tu-cottbus.de>, Anne van Kesteren <annevk@opera.com>, www-dom@w3.org
On 1/7/11, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 1/7/11 7:44 AM, Gerd Wagner wrote:
>>>> What about replacing the misnomer "currentTarget" by "observer" in the
>>>> Event interface?
>>> We cannot break compatibility.
>> I understand this requirement, but does it imply that we have to live
>> with bad choices made in the past (going on to create misunderstanding
>> costs) forever?
> More or less, yes.
>> One possible approach would be introducing "observer" and declaring
>> "currentTarget" as deprecated.
> How does that help?  UAs will have to implement currentTarget forever,
> right?  What incentive will web pages have to use the thing that breaks
> in some UAs as opposed to just continuing to use currentTarget?  What
> incentive will UAs have to implement the new thing?
A "web page" has no mind, so no incentive.

The author would have the motivation to write code that would not lead
to confusion between target and currentTarget and more aptly describes
the role of what is currently labeled "currentTarget".

> (As a side note, "observer" is even more opaque than "currentTarget" to
> me, since there is no mention of an "observer" anywhere in the DOM event
> model, but I'm presuming we could in fact find a better name, for
> purposes of this discussion and to avoid bikeshedding about the name.)
actuator, activator, trip, trigger, emitter.
Received on Friday, 7 January 2011 18:50:50 UTC

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