Bug 1619947 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

So, I finished an implemented of `clipboard.write` that can handle Blob promises. I also re0implemented `clipboard.writeText` in terms of `write` using a sequence of ClipboardItems.

Something I noticed however is that `ClipboardItemDataType` is  `(DOMString or Blob)`, but `ClipboardItem.getType` returns `Promise<Blob>` not sure how that is supposed to work. Are we supposed to implicitly convert the promises? I can't actually find any specification of how ClipboardItem is supposed to work in that regard.

So finally probably the biggest issue I've run into: `nsIClipboard` doesn't actually seems able to handle multiple transferables. That means only a single type will ever end up on the clipboard. That seems like a very serious limitation and makes all of this work of handling multiple items of multiple types sort of pointless. Am  I missing something?
So, I finished an implemented of `clipboard.write` that can handle Blob promises. I also re0implemented `clipboard.writeText` in terms of `write` using a sequence of ClipboardItems.

Something I noticed however is that `ClipboardItemDataType` is  `(DOMString or Blob)`, but `ClipboardItem.getType` returns `Promise<Blob>` not sure how that is supposed to work. Are we supposed to implicitly convert the promises? I can't actually find any specification of how ClipboardItem is supposed to work in that regard.

~So finally probably the biggest issue I've run into: `nsIClipboard` doesn't actually seems able to handle multiple transferables. That means only a single type will ever end up on the clipboard. That seems like a very serious limitation and makes all of this work of handling multiple items of multiple types sort of pointless. Am  I missing something?~
We write all data to index 0 so this actually probably works.

Back to Bug 1619947 Comment 11