-
Notifications
You must be signed in to change notification settings - Fork 394
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
"responsible" is not an adjective that can be applied to documents #873
Comments
Of course not all places that check for "responsible" check for "active", and the "active" check in "active and focused" doesn't check for "active" either.... so I am really not sure what this is aiming to check for and hence what the right check should be. |
see also #497, especially #497 (comment) |
my rough plan for this is to make every object created by XR to be created in the realm of a particular Now, what the right check then is I'm not sure about; I suspect it's that the document is fully active. |
@bzbarsky if you want some more head-scratching, the corner case I'm currently mulling over is that the WebGL context can come from a canvas in a different document from the |
So the entry points involved here are .. what? I see The other entrypoint I see is still None of that seems to involve a WebGL context in any obvious way at first glance. In general, if things you don't want to be reacting to |
@bzbarsky the XR session gets it's GL context given to it as part of https://immersive-web.github.io/webxr/#dom-xrsession-updaterenderstate, which includes a The XR session implicitly updates the state of the context, for example by flushing its GPU pipeline, swapping buffers on the XR framebuffer, and presenting the XR framebuffer contents to the user via the XR device. None of that calls any methods on the context, so there's no security checks, but like you said "IF you have your hands on objects, you can work with them." I think the important parts of https://immersive-web.github.io/webxr/#immersive-session-request-is-allowed are 1 and 3, which are "triggered by user activation or launching a web application" and "explicit consent or implicit consent," I share your confusion around 2 "the requesting document is not considered trustworthy", which requires the document (I presume the one associated with the XR object) to be "responsible" (which like you say, is a category error) and active and focused. Looking over the git history, this seems to be #761. @toji do you know what the motivation for https://immersive-web.github.io/webxr/#trustworthy was? |
There are a few places in https://immersive-web.github.io/webxr/ that talk about "a responsible document" or "document is not responsible" with links to https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document
That linked-to thing is a definition of a property of script settings object, and the property's name is "responsible document". There is no separate concept of "responsible" that applies to documents in the specs right now.
Maybe the spec means "is the responsible document of some settings object"? Does the spec really mean that, as opposed to, say "a document that has a browsing context" in the sense of https://html.spec.whatwg.org/multipage/browsers.html#concept-document-bc? (Those concepts are not identical, but they are for documents that are the active document of their browsing context, and doing the browsing context check would lead to a somewhat-natural fix to #872 as well, since you would then have a browsing context.)
The text was updated successfully, but these errors were encountered: