Re: [w3c/clipboard-apis] Proposal: Identifying whether the clipboard has changed without re-reading it (Issue #232)

Hi @dandclark, thanks for the reply! Let me try to address some points You mentioned.

Firstly - yes, probably `clipboardchange` event including somewhere the token of this form would be a sufficient solution for the mentioned use cases. The only drawback I see is that it doesn't seem like there's any possibility to implement `clipboardchange` efficiently (that is, without polling) on macOS and iOS - while `contentsID` in the form detailed in my explainer is easily implementable now on all of the mentioned platforms.

Secondly - the privacy concerns mentioned there might be slightly less applicable here, as the form of this API is a function similar to `navigator.clipboard.read()` and could be behind those same guardrails. In this form, it could require user activation (though this would require altering the flow detailed in the explainer) and would not expose practically any substantially data that the current API doesn't already provide. Theoretically, this function could even be implemented now in plain JavaScript via using `read()` and then hashing the clipboard contents. It just (depending on the size of clipboard contents) wouldn't be as efficient and potentially bump up the memory usage.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/232#issuecomment-2586989800
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/clipboard-apis/issues/232/2586989800@github.com>

Received on Monday, 13 January 2025 12:35:29 UTC