-
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
Add WakeLockSentinel.released. #279
Conversation
Please take a look -- I'll file bugs, send PRs and update links in the PR description once someone checks if this is the right approach. The PR is so small that I feel I'm missing something obvious :-) |
`released` is a read-only boolean attribute that indicates whether a WakeLockSentinel has been released. Its initial value is false, and it is changed to true by the "release a wake lock" algorithm. Fixes w3c#272.
88b4a9f
to
f6410c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to move when the lock is released to the actual task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! One tiny nit... could you please run tidy on the doc before merging?
The new attribute was added to the spec in w3c/screen-wake-lock#279.
I already did :-) #274 fixed all existing style issues, and I always run tidy before sending new PRs. |
Adopt some post-commit suggestions posted to w3c#279: * `WakeLockSentinel.released` is a read-only attribute, so saying "change its value" in the "release a wake lock" algorithm is a contradiction. Instead, add a `[[Released]]`` internal slot to WakeLockSentinel and change that instead, and change `released`'s description to mention the slot. * While here, add a separate section to each WakeLockSentinel attribute.
Adopt some post-commit suggestions posted to w3c#279: * `WakeLockSentinel.released` is a read-only attribute, so saying "change its value" in the "release a wake lock" algorithm is a contradiction. Instead, add a `[[Released]]` internal slot to WakeLockSentinel and change that instead, and change `released`'s description to mention the slot. * While here, add a separate section to each WakeLockSentinel attribute.
Adopt some post-commit suggestions posted to #279: * `WakeLockSentinel.released` is a read-only attribute, so saying "change its value" in the "release a wake lock" algorithm is a contradiction. Instead, add a `[[Released]]` internal slot to WakeLockSentinel and change that instead, and change `released`'s description to mention the slot. * While here, add a separate section to each WakeLockSentinel attribute.
The new attribute was added to the spec in w3c/screen-wake-lock#279.
…te. (#25271) The new attribute was added to the spec in w3c/screen-wake-lock#279.
This new attribute indicates whether a sentinel object has been released or not. While here, move the dispatching of the "release" event to a separate method so that we can really change |release|'s value and dispatch the event in a separate, queued task. Additional web tests have been sent directly to WPT in web-platform-tests/wpt#25271. Spec PR: w3c/screen-wake-lock#279 ChromeStatus entry: https://chromestatus.com/feature/5632527123349504 Intent to Prototype and Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/1V6Ss1VABko/m/Y3Nl0vHIAQAJ Fixed: 1122518 Change-Id: Iff39ec3db630fa959e6c3c82b9c5ee8df93b681c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379740 Commit-Queue: Yoav Weiss <[email protected]> Reviewed-by: Yoav Weiss <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Auto-Submit: Raphael Kubo da Costa <[email protected]> Cr-Commit-Position: refs/heads/master@{#804729}
This was added to the spec in [1], and to Blink in [2], which is present since Chromium 87. [1] w3c/screen-wake-lock#279 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2379740
This was added to the spec in [1], and to Blink in [2], which is present since Chromium 87. [1] w3c/screen-wake-lock#279 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2379740
This new attribute indicates whether a sentinel object has been released or not. While here, move the dispatching of the "release" event to a separate method so that we can really change |release|'s value and dispatch the event in a separate, queued task. Additional web tests have been sent directly to WPT in web-platform-tests/wpt#25271. Spec PR: w3c/screen-wake-lock#279 ChromeStatus entry: https://chromestatus.com/feature/5632527123349504 Intent to Prototype and Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/1V6Ss1VABko/m/Y3Nl0vHIAQAJ Fixed: 1122518 Change-Id: Iff39ec3db630fa959e6c3c82b9c5ee8df93b681c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379740 Commit-Queue: Yoav Weiss <[email protected]> Reviewed-by: Yoav Weiss <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Auto-Submit: Raphael Kubo da Costa <[email protected]> Cr-Commit-Position: refs/heads/master@{#804729} GitOrigin-RevId: 9e71d67dff4dbd78991744fb13a6f35bb8e46719
released
is a read-only boolean attribute that indicates whether aWakeLockSentinel has been released. Its initial value is false, and it is
changed to true by the "release a wake lock" algorithm.
Fixes #272.
The following tasks have been completed:
Implementation commitment:
Preview | Diff