-
Notifications
You must be signed in to change notification settings - Fork 421
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
Type "clipboard-write" is not assignable to type "PermissionName" #1245
Comments
Clipboard permissions are at risk:
And thus I think this won't be solved, at least not anytime soon. |
Hi! Also, I guess I can use Thank you. EDIT: |
Still relevant. Any updates? navigator.permissions.query({ name: "clipboard-write" as PermissionName }).then(result => {}); |
|
@saschanaz. Oh, I got it. An open issue misled me, I thought it was an error ... |
Description
When using the Clipboard API, one might need to request permission for the
clipboard-write
in case we want to add something to the user's system clipboard if the user didn't already yield the permission.Issue
When providing the
clipboard-write
permission to thewindow.navigator.permissions.query({name: "clipboard-write"});
method, the compiler throws an error saying thatType "clipboard-write" is not assignable to type "PermissionName"
.Reproduction code
Typescript version
4.5.4
Additional context
It looks like the
clipboard-write
andclipboard-read
permissions are not listed in thelib.dom.d.ts
file for thePermissionName
type, although they are part of the standard Clipboard API.The text was updated successfully, but these errors were encountered: