Re: [w3c/clipboard-apis] Clipboard API mixes representations of an item with distinct items. (#55)

There is no way to specify that an item has multiple flavors/representations on the clipboard. mozGetDataAt and mozSetDataAt got this correct with an index that was in common across the flavors of a given item. This is also reflective of the native clipboard API.  Adding a series of flavors to the clipboard as individual items of a DataTransfer object doesn't help the receiver determine if they're a flavor or unique item.  Electron has a similar problem with only support for single item, multiple flavors.

Examples:
items: foo.png foo.jpg <- single item, two flavors
items: foo.png bar.jpg <- multiple items, two unique items
items: foo.png foo.jpg, bar.png bar.jpg <- multiple items, two flavors of the each item

In the DataTransfer item list, and index is needed to collect items.
item[0]             item[1]
index: 0            index: 0  <- this is what is missing
name: foo.png name: foo.jpg  <- flavors of same content
blob/file           blob/file

-- 
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/55#issuecomment-346975740

Received on Sunday, 26 November 2017 00:39:26 UTC