Re: geolocation.clearWatchAll()

On Fri, Oct 3, 2008 at 6:46 PM, Aaron Boodman <aa@google.com> 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.
>

I think this is a good point. The library code runs in the same
execution context as the client code that uses it. clearAll() would
affect all watches set by either the library or the client application
code.

Andrei

Received on Friday, 3 October 2008 18:00:11 UTC