W3C home > Mailing lists > Public > public-geolocation@w3.org > October 2008

Re: geolocation.clearWatchAll()

From: Doug Turner <doug.turner@gmail.com>
Date: Fri, 3 Oct 2008 11:01:40 -0700
To: Aaron Boodman <aa@google.com>
Message-Id: <AFB98B9F-89F3-4406-849D-C86B040A4EE8@gmail.com>
Cc: Andrei Popescu <andreip@google.com>, public-geolocation <public-geolocation@w3.org>


On Oct 3, 2008, at 10:46 AM, Aaron Boodman wrote:

> On Fri, Oct 3, 2008 at 10:38 AM, Doug Turner <doug.turner@gmail.com>  
> wrote:
>> clearWatchAll() should be scoped by the js context it is called in.
>
> By js context, do you mean DOM window?
>
> Let's say you use the prototype JS library, and it has functionality
> that uses the Geolocation API. Let's also say that you write some of
> your own code to use Geolocation. Now if you or Prototype use this
> clearAllWatches(), you can break each other.
>
> This isn't that contrived, this problem existed for a long time with
> DOM 0 event handlers (onload, onclick, etc). That is part of the
> reason why event listeners (addEventListener, removeEventListener)
> were introduced.
>
> - a

Sounds like a good reason to not implement clearWatchAll().
Received on Friday, 3 October 2008 18:02:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:50:51 UTC