- From: Ted Mielczarek <ted@mielczarek.org>
- Date: Tue, 31 Jul 2012 08:01:03 -0400
- To: Scott Graham <scottmg@chromium.org>
- Cc: Adam Barth <w3c@adambarth.com>, Travis Leithead <travis.leithead@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
On Thu, Jul 26, 2012 at 9:20 PM, Scott Graham <scottmg@chromium.org> wrote: > There's no particular indication at the spec level to indicate stopping the > gamepad polling, based on the assumption that it's an implementation detail. > Maybe there should be some way for content to hint that though? > > I guess an implementation could timeout and shutdown background resources if > the content does not request data for some amount of time too. I was thinking that this isn't much different than the use case in the geolocation API spec[1]. Perusing that spec shows that it has "watchPosition" / "clearWatch" APIs for explicitly registering/unregistering for location updates. I don't know if I particularly want to add an API like that, but conceptually we might want something like that. In my current implementation in Firefox, the background polling is triggered by the page adding event listeners for one of the DOM events. I don't recall offhand if unregistering for the events stops the polling, or if it takes having the document unloaded. -Ted 1. http://www.w3.org/TR/geolocation-API/
Received on Tuesday, 31 July 2012 12:01:31 UTC