- From: Aaron Boodman <aa@google.com>
- Date: Fri, 3 Oct 2008 10:46:57 -0700
- To: "Doug Turner" <doug.turner@gmail.com>
- Cc: "Andrei Popescu" <andreip@google.com>, public-geolocation <public-geolocation@w3.org>
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
Received on Friday, 3 October 2008 17:47:38 UTC