githubnext / blocks

A set of files to use as input for Blocks.
https://blocks.githubnext.com
MIT License
337 stars 43 forks source link

consider supporting Clipboard API #52

Open jaked opened 1 year ago

jaked commented 1 year ago

feedback from @HiDeoo:

I tried adding a copy to the clipboard button but due to the iframe setup, it looks like it's not possible to use the Clipboard API as we get a DOMException: The Clipboard API has been blocked because of a permissions policy applied to the current document.. The iframe allow attribute is currently set to camera;microphone;xr-spatial-tracking. Is there any plan / thoughts regarding adding at least clipboard-write (clipboard-read may be too much) to the list of allowed permissions? (ref: https://web.dev/async-clipboard/#permissions-policy-integration - cross-origin syntax: https://stackoverflow.com/a/69741484/1945960)

Hacksore commented 1 year ago

Started copying what @HiDeoo is doing but for package managers.

Sadly you need the clipboard-write on the iframe, are security considerations the blocker here atm?

image