Re: Core Device APIs

Hi Robin,

fwiw, geolocation wouldn't use device.cancel().  in some of our early discussed we had a notion of cancelAll() that would cancel all pending geolocation requests.  To make the API simpler, we dropped this form.  Instead, every call to cancel needs to pass a request id:


var watchID = navigator.geolocation.watchPosition(successCallback, failureCallback, null);
....
navigator.geolocation.clearWatch(watchID);


Other APIs that we have discussed in the Geo WG have been accelleration and orientation.  In both cases, we have been considering using dom style events (addEventListener) and the right way to cancel in this model is to just call removeEventListener.

Regards,

Doug Turner


On Dec 2, 2009, at 5:34 AM, Robin Berjon wrote:

> Hi,
> 
> I've updated http://dev.w3.org/2009/dap/device/ to hold PendingOp as well. I'd welcome review of this (short) specification, and reuse of it. If people agree, this is a contender for swift publication.
> 
> --
> Robin Berjon
>  robineko — hired gun, higher standards
>  http://robineko.com/
> 
> 
> 
> 
> 

Received on Wednesday, 2 December 2009 18:02:06 UTC