Skip to content
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

Permission & Workers #18

Open
mingyc opened this issue Sep 11, 2024 · 1 comment
Open

Permission & Workers #18

mingyc opened this issue Sep 11, 2024 · 1 comment

Comments

@mingyc
Copy link

mingyc commented Sep 11, 2024

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?

  • Does the API require user gesture to trigger permission prompt?
  • Should dedicated workers directly inherit the access from the document?
  • Can a shared/dedicated/service worker request for such permission by themself?
@domenic
Copy link
Collaborator

domenic commented Sep 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants