w3c / geofencing-api

13 stars 9 forks source link

Review procedures for when a geofence breach is no longer detectable (from Josh Soref) #23

Closed gmandyam closed 8 years ago

gmandyam commented 9 years ago

Sec. 6.2.2 of June 22, 2015 draft (GeofenceErrorEvent) outlines procedures for the UA when a geofence can longer be actively monitored.

Upon detecting some situation in which the user agent won't be able to detect future breached of a geofence, the user agent MUST run the following steps:

The UA detects it has a few seconds of battery power left and needs to turn off GPS. It MUST now start all of the registered service workers which have geofences and tell them that it isn't going to be able to monitor their fences? That seems bad.

Let event.code be an error code.

Are error codes in style? (I'm pretty sure numeric codes are indeed not in style) And shouldn't you provide at least a little more instruction about an error code?

mkruisselbrink commented 8 years ago

I think the current spec addresses this sufficiently. There might be some room for more clarification with what should happen in various error situations, but I don't want to over-specify things, and forcing all user agents to make the exact same trade-offs for the various potential problem situations.