Re: [w3c/clipboard-apis] Clarifying the Error Types for clipboard APIs (Issue #235)

EdgarChen left a comment (w3c/clipboard-apis#235)

On Gecko, the promise rejection of `clipboard.write()` doesn’t come from the `representationDataPromise` itself, but occurs after verifying its fulfillment value. I think other browsers behave the same way per https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=13745: `getType()` doesn't throws when called on the `ClipboardItem` that contains the malformed image data. 

The spec doesn’t currently mention anything about verifying image data. But since all browsers do perform validation and throw an error if the image data is invalid before writing to the system clipboard (though browsers raise different error). Perhaps we could consider adding that into spec? 

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

Message ID: <w3c/clipboard-apis/issues/235/2854893360@github.com>

Received on Tuesday, 6 May 2025 15:00:24 UTC