Re: Hanging stuff of navigator

On Thursday, May 16, 2013 at 4:19 PM, Alex Russell wrote:

> watchPosition() and clearWatch() don't seem to difficult -- watchPosition() starts an event stream.

Right, I thought of the same. But we don't have a standard way on the platform to register for "event streams". That is, neither addEventListener() nor "foo.onwhatever" (EventHandler attribute) are well suited for this because of the need to provide "options". 

So, something like: 

EventStream watchPosition( optional options); 

var es = Geolocation.watch( options );
es.on("change", handleChange);
es.on("error", handleError); 

es.close(); 

> getCurrentPosition() seems like a candidate for Futures, though.
Absolutely.  

Received on Thursday, 16 May 2013 15:34:34 UTC