-
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
Introduce "implicitly restricted APIs". #62
Conversation
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.
LGTM. I agree the existing text about "do not count as hidden" is wrong; maybe I was thinking of portals.
|
||
<h3 id="interaction-with-visibility-state">Interaction with Page Visibility</h3> | ||
|
||
Documents in [=prerendering browsing contexts=] are [=Document/hidden=]. |
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.
Note that for portals this might not be true, and portals are envisioned to be a type of prerendering browsing context. We might want to state that subtlety here as a TODO or Note, even though portals spec work is kind of on hold while we get these foundations worked out...
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.
Done, added it as an Issue which seemed consistent with the other Issues about portals.
index.bs
Outdated
@@ -853,3 +870,9 @@ The following APIs do not need modifications, because they will automatically fa | |||
- Firing of clipboard events, as well as {{Clipboard/read()|navigator.clipboard.read()}} and {{Clipboard/readText()|navigator.clipboard.readText()}} [[CLIPBOARD-APIS]] | |||
- {{Navigator/share()|navigator.share()}} [[WEB-SHARE]] | |||
- {{Element/requestPointerLock()|element.requestPointerLock()}} [[POINTERLOCK]] | |||
|
|||
APIs that require the [=Document/visible=] [=Document/visibility state=]: | |||
- {{WakeLock/request()}} [[WAKE-LOCK]] |
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.
- {{WakeLock/request()}} [[WAKE-LOCK]] | |
- {{WakeLock/request()|navigator.wakeLock.request()}} [[WAKE-LOCK]] |
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.
I made this change, also reverted to [SCREEN-WAKE-LOCK] which I didn't realize the original spec had instead of [WAKE-LOCK]. I don't know what source code that comes from.
Thanks, done! I added a commit though the diff still seems to show the old one. Would you be able to merge if it's ready? I don't have write access. |
This expands "Activated-Gated APIs" to cover other reasons that an API
can be implicitly restricted, namely, if it requires system focus or
page visibility.
It also clarifies that prerendering browsing contexts never have system
focus or page visibility, as per discussion in #59 and #55.
Preview | Diff