-
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
Clarify prerendering documents cannot have focus. #55
Comments
@a4sriniv might have thoughts about focus in prerendering/portal contexts |
We only very recently added the concept of system focus to the HTML spec. My take, based on previous discussions, is that prerendering browsing contexts can have their contents focused (e.g., they can have a nontrivial |
I agree with @domenic, prerendering browsing contexts should behave the same as portals do currently (they don't have system focus and only get it on activation). See WICG/portals#257 for the portals discussion on focus. |
Thank you for discussing! |
Thanks @Clqsin45 for raising this. We could probably extend the section on Activation-gated APIs to also cover System Focus-gated APIs: |
It appears some APIs like Picture-In-Picture may also be gated on visibility state as well as user activation (e.g., https://w3c.github.io/picture-in-picture/#auto-pip can be used without user activation if visibility state changes??), so we may also add visibility state to this section. Filed related #59 |
Some APIs's specs[1][2] require documents to have focus[3] when using these APIs. So for prerendering, maybe we should clarify that prerendering documents cannot be focused and executing
document.hasFocus()
on these pages always returnsfalse
[4].Maybe we should also clarify that prerendering browsing context cannot be active?
cc: @nhiroki
[1] https://w3c.github.io/clipboard-apis/#privacy-async
[2] https://www.w3.org/TR/pointerlock/#extensions-to-the-element-interface
[3] https://html.spec.whatwg.org/multipage/interaction.html#focus
[4] https://chromium-review.googlesource.com/c/chromium/src/+/2743865/5..9/third_party/blink/web_tests/wpt_internal/prerender/resources/document-has-focus.html#b17
The text was updated successfully, but these errors were encountered: