- From: Jeffrey Yasskin <notifications@github.com>
- Date: Thu, 12 Dec 2024 13:32:44 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/clipboard-apis/issues/228/2540053849@github.com>
I think your `onclick` code is just ```javascript element.onclick = () => navigator.clipboard.read().then(...); ``` That is, no change needed if you don't want an event. I can see an ergonomic improvement from having an event, for pages where the user expects the page to react to every clipboard change, even in the Safari+Firefox model where it only propagates during transient activation. The spec would need to change from > If the clipboard contents are changed outside the user agent, then the [clipboardchange](https://w3c.github.io/clipboard-apis/#eventdef-globaleventhandlers-clipboardchange) event MUST fire when the user agent regains focus. to something like > If the clipboard contents are changed outside the user agent, then the [clipboardchange](https://w3c.github.io/clipboard-apis/#eventdef-globaleventhandlers-clipboardchange) event MUST fire the next time [check clipboard read permission](https://w3c.github.io/clipboard-apis/#check-clipboard-read-permission) becomes true. [... with a parallel change to make [check clipboard read permission](https://w3c.github.io/clipboard-apis/#check-clipboard-read-permission) allow the behaviors of all three engines] [... and that whole statement should probably also be refactored to be more algorithmic.] Note that, as you said, even with this change the event is somewhat more privacy-invasive than no-event (per #230), since you stop being able to treat pages that read "too often" as potentially abusive. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/228#issuecomment-2540053849 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/228/2540053849@github.com>
Received on Thursday, 12 December 2024 21:32:48 UTC