-
Notifications
You must be signed in to change notification settings - Fork 197
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
Document how to set clipboard-write permission #6156
Conversation
dab5b92
to
298dd0e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6156 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 263 263
Lines 10099 10099
Branches 2412 2412
=======================================
Hits 10043 10043
Misses 56 56 ☔ View full report in Codecov by Sentry. |
The I think we can address this by changing "requires the |
I commented in w3c/clipboard-apis#163 (comment) to see if anything can be done about changing Chrome's behavior so this extra step isn't needed. |
298dd0e
to
16cf839
Compare
@robertknight I pushed this. |
|
||
.. code-block:: html | ||
|
||
<iframe allow="clipboard-write"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should generalize this section to include other permissions that are relevant. The clipboard is the main one, but there is also the fullscreen
permission for embedded media.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought about that. Let's merge this one and I'll create an issue to extend this and make it more generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done #6157
16cf839
to
f0f08c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As noted in #6155 (comment), this PR documents the need to allow
clipboard-write
and how to do it, when loading Hypothesis inside an iframe.This is needed for the various places in which content can be copied to the clipboard.
This is how the rendered content looks like, but it can be tested by running
make docs
and going to http://127.0.0.1:8000/publishers/embedding/#clipboard-permissions-when-loaded-in-an-iframe