-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requesting wake locks from Workers #156
Comments
OK, adding this now is quite simple but we have a few things to handle later
|
Additional info here: w3c/sensors#388 |
So this should work now by using the permission spec, but should we still add a |
I see no harm in adding a |
It is static on notification spec as well as on device orientation and motion - so let's go with that How does this look?
|
Seems reasonable. |
Any reason why requestPermission() has to be static in Wakelock's case. in case of Notifications API may be there are many different types of notifications but for WakeLock we are dealing with only two types of wakelocks. I would prefer non-static version which inherits parameters. |
@mrunalk yes
|
For all intents and purposes a wake lock requested from a (dedicated) worker is the same as one requested by the frame that owns the worker but especially for system wake locks which are likely being held to a computation continues uninterrupted it makes sense to have that managed by the worker performing the computation.
This does raise a question for implementations on how to determine when a worker script has become unresponsive.
The text was updated successfully, but these errors were encountered: