Re: geolocation.clearWatchAll()

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