Re: [w3c/clipboard-apis] Add clipboard IDL description. (#158)

@snianu commented on this pull request.



>    };
   </pre>
 
-  <div id="clipboard-idl" dfn-for="Clipboard">
+  Some methods of the {{Clipboard}} interface take or return multiple {{ClipboardItem}} objects. However, not all platforms support more than one [=/clipboard item=]; on such platforms, the algorithms below will ignore any {{ClipboardItem}} objects beyond the first one that are passed to {{Clipboard/write()}}, and {{Clipboard/read()}} and {{Clipboard/readText()}} will only ever return a single-item array.

I'm not sure exactly how multiple `clipboard item`s are written to the clipboard on Mac, but at least in Chromium we always pick the first `ClipboardItem`. Hence the text `then add |data|[0] to |dataList|` in `write()` method. I'm assuming that the last one doesn't replace the previous ones here as there are multiple clipboard on Mac.

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

Message ID: <w3c/clipboard-apis/pull/158/review/873376859@github.com>

Received on Friday, 4 February 2022 17:29:46 UTC