Intent to ship: navigator.clipboard.read() and navigator.clipboard.write()

403 views
Skip to first unread message

Edgar Chen

unread,
Apr 29, 2024, 4:00:12 AMApr 29
to dev-pl...@mozilla.org
They have been enabled on Nightly and early beta since Firefox 122 [1].
As of Firefox 127, I intend to enable clipboard.read()/write() by default on all channels.

This feature was previously discussed in this “Intent to prototype” thread: https://groups.google.com/a/mozilla.org/g/dev-platform/c/doxNXSEFtEE/m/DEeKdaZuAQAJ

--
Best Regards,
Edgar Chen

Martin Thomson

unread,
Apr 30, 2024, 7:37:35 PMApr 30
to Edgar Chen, dev-pl...@mozilla.org
Hi Edgar,

What is the status with respect to the clipboard-read permission?  The spec is not very clear on this point and the explainer points to a (resoved) bug regarding the permission.

I have something of a strong aversion to sites being given access to my clipboard, except under very tight constraints.  That said, I think that the algorithm in https://w3c.github.io/clipboard-apis/#read-permission seems about right (and is consistent with what I understand existing behavior to be).  Are we limiting access to when there is a transient "Paste" activation?


--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAN1gQc7ZDKZi1h8JG3OCsx-FxjPPnn_5sNLJ2tvH9MstDKi-LA%40mail.gmail.com.

Edgar Chen

unread,
May 1, 2024, 7:28:33 AMMay 1
to Martin Thomson, dev-pl...@mozilla.org
Hi Martin:

> Are we limiting access to when there is a transient "Paste" activation?

We only allow a page to read from the system clipboard when there is a valid user transient activation. And if the content in the system clipboard isn't originated from the same-origin page, a paste context menu will be prompted to the user, who would need to click it explicitly to allow the access.

--
Best regards,
Edgar Chen




On Wed, May 1, 2024, 01:37 Martin Thomson <m...@mozilla.com> wrote:
Hi Edgar,

What is the status with respect to the clipboard-read permission?  The spec is not very clear on this point and the explainer points to a (resoved) bug regarding the permission.

I have something of a strong aversion to sites being given access to my clipboard, except under very tight constraints.  That said, I think that the algorithm in https://w3c.github.io/clipboard-apis/#read-permission seems about right (and is consistent with what I understand existing behavior to be).  


Mike Kaply

unread,
May 1, 2024, 8:24:40 AMMay 1
to Edgar Chen, Martin Thomson, dev-pl...@mozilla.org
It looks like Chrome browsers have implemented an explicit clipboard permission.

Are we planning to do that at some point?

It would make it a lot easier for enterprises to enable/disable clipboard on specific sites.

Mike

Martin Thomson

unread,
May 1, 2024, 8:59:25 PMMay 1
to Mike Kaply, Edgar Chen, dev-pl...@mozilla.org
I hope that we do not implement an explicit request for clipboard read permission.  Maybe I shouldn't be so paranoid, but my own clipboard is routinely home to all sorts of secrets.
Reply all
Reply to author
Forward
0 new messages