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

synchronous error handling.

From: Doug Turner <doug.turner@gmail.com>
Date: Fri, 24 Oct 2008 11:03:42 -0700
Message-Id: <3FA7A851-F73C-4223-8107-8DE2F18891B5@gmail.com>
To: public-geolocation <public-geolocation@w3.org>

I think we need a bit of clarification regarding when the  
PositionErrorCallback may be called.  when a developer calls  
watchPosition() and passes a PositionErrorCallback, when is it  
permissible to use the error callback to report errors?

for example, if we detect an error while processing watchPosition(),  
can we immediately call out to the PositionErrorCallback?  Or is the  
expectation, that watchPosition() will return before  
PositionErrorCallback is invoked?

Looking at the xml http request for guidance, they have separated out  
the setup of the request with the actual request:

xmlhttp.open("GET", url, true);

I do not think we need to do this, but we do need to clarify when the  
callback can be invoked. I am of the opinion that the callback may be  
called at any time after it is passed to watchPosition() -- even  
before it returns.  is there any strong opinion that this approach is  

The same, of course, applies to getCurrentLocation().

Doug Turner
Received on Friday, 24 October 2008 18:04:24 UTC

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