- From: 一丝 <notifications@github.com>
- Date: Thu, 22 Feb 2024 23:47:27 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 23 February 2024 07:47:31 UTC
> I'm not sure if we can standardize the ordering of the formats in the system clipboard, but perhaps we can maintain the order of the formats in the ClipboardItem as specified by the web authors during navigator.clipboard.write? Yes, Safari currently does that. ```js navigator.clipboard.write([ new ClipboardItem({ // Adjusting the order here in Safari will change the order in which it is written to the clipboard. 'image/png': new Promise(async resolve => { const response = await fetch("https://upload.wikimedia.org/wikipedia/commons/8/89/PNG-Gradient.png"); resolve(await response.blob()); }), 'text/plain': new Promise(resolve => { const blob = new Blob([text], { type: 'text/plain' }); resolve(blob); }), }) ]); ``` -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/137#issuecomment-1960866913 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/137/1960866913@github.com>
Received on Friday, 23 February 2024 07:47:31 UTC