-
Notifications
You must be signed in to change notification settings - Fork 11
Permission & Workers #18
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
Comments
This is a great question. I would prefer not to require user activation, but we should check the precedent of other APIs to see if that's reasonable. My recollection for workers is that dedicated workers inherit permissions directly from their parent (and, e.g., can cause a prompt in their parent's window). But in most cases shared/service workers cannot do any prompting, and either various permission-requiring APIs do not work there, or they only work if the user has previously granted permission to a window/dedicated worker. This gets a bit more complicated in specs and in Firefox where it's possible to nest dedicated workers under shared/service workers. Let me do more research and try to come up with clearer answers. |
I am beginning to believe we should remove workers, at least for v1. We want to restrict access from cross-origin iframes by default. The right mechanism for that is permissions policy. Permissions policy works on documents and does not have any mechanism for propagating to workers right now. So our options are:
(You might think there's an option to only do PP checks in documents and omit them in workers. That defeats the point as then a cross-origin iframe can just create a worker to circumvent our restrictions.) I think the choice is between 1 and 2, and I think going with 1 for now is most reasonable. |
Assuming we are adding permission (as described by the doc) to gate download/access to language models, what are the default behaviors for shared/dedicated/service workers when they try to use the Translation API?
The text was updated successfully, but these errors were encountered: