Skip to content

design for overload of requestStorageAccess #30

@dontcallmedom

Description

@dontcallmedom

(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions