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

iFrame blocks navigator.clipboard.writeText #1202

Open
signorpipo opened this issue Jun 4, 2021 · 1 comment
Open

iFrame blocks navigator.clipboard.writeText #1202

signorpipo opened this issue Jun 4, 2021 · 1 comment

Comments

@signorpipo
Copy link

I need to copy to the clipboard from within my HTML game, but on itch the iFrame require extra permissions to let the writeText works.

It seems that for this it is required to specify something as follow:
<iframe src="index.html" allow="clipboard-write"></iframe>

@pi-kei
Copy link

pi-kei commented Jun 17, 2021

I found out that document.execCommand("copy"); method works. At least in Chrome.

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