- From: Ian Kilpatrick <notifications@github.com>
- Date: Thu, 15 Mar 2018 23:56:15 +0000 (UTC)
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 15 March 2018 23:56:40 UTC
This was pointed out by @domenic - It seems like you might be able to avoid all of the barnacles on the `DataTransfer` object, by just using a `DataTransferItemList` directly. E.g. ```js const list = new DataTransferItemList(); // would need to expose a constructor? list.add('text/plain', '\o/'); await navigator.clipboard.write(list); ``` Currently all the examples in the explainer would be covered by above, rather than the more generic DataTransfer. This would above the awarkward questions, what does `dataTransfer.setDragImage()` do? etc. It _may_ (not sure about this) also be an opportunity to add convenience constructor for `DataTransferItemList`, e.g. ```js new DataTransferItemList([{type: 'text/plain', content: 'foo'}]) ``` ... or something :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/72
Received on Thursday, 15 March 2018 23:56:40 UTC