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

design for overload of requestStorageAccess #30

Open
dontcallmedom opened this issue Jun 6, 2024 · 0 comments
Open

design for overload of requestStorageAccess #30

dontcallmedom opened this issue Jun 6, 2024 · 0 comments

Comments

@dontcallmedom
Copy link
Contributor

(follow up to #29)

IIUC, the current proposal is to have an overloaded version of requestStorageAccess that takes a mandatory parameter types.

WebIDL requires to make optional dictionary parameters if they're last and the dictionary doesn't have required members.

Now, as discussed in #29, it can't be made optional otherwise it is no longer distinguishable from the existing requestStorageAccess.

A few (not thought-through) ideas to resolve that situation:

  • instead of an overload, replace the existing requestStorageAccess and have the default value be {cookies: true} (if Web compat requires it) - I don't think that replacing Promise<undefined> with Promise<StorageAccessHandle> would create compat issues
  • make one of the member of StorageAccessTypes required (but not sure which one would make sense)
  • use a different name for the method (e.g. requestStorageAccessHandle) rather than an overloaded one
dontcallmedom added a commit to w3c/webref that referenced this issue Jun 6, 2024
Use invalid non-optional dictionary as last argument; see privacycg/saa-non-cookie-storage#30
tidoust pushed a commit to w3c/webref that referenced this issue Jun 6, 2024
Use invalid non-optional dictionary as last argument; see privacycg/saa-non-cookie-storage#30
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

1 participant