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

@snianu commented on this pull request.



>  
-    Promise<Blob> getType(DOMString type);
-  };
+   dictionary ClipboardItemOptions {
+   PresentationStyle presentationStyle = "unspecified";
+   };
+  </pre>
+  <p><dfn export for=ClipboardItem id=concept-clipboard-item>ClipboardItem</dfn></p>
+  The [=ClipboardItem=] object has MIME types that are in the {{ClipboardItem/types}} list, and [=Blob=]s corresponding to the {{ClipboardItem/types}}.
+  It has a mapping of the MIME types in {{DOMString}} format and a [=Blob=] corresponding to the MIME types that contains the actual payload.
+  There can be multiple [=ClipboardItem=]s as each [=ClipboardItem=] represents contents of a clipboard, and there can be multiple clipboards supported on a platform such as iOS/iPadOS.

I'm not very familiar with macOS, but from [this ](https://developer.apple.com/documentation/appkit/nspasteboard?language=objc)article, it looks like we could create multiple pasteboards using the create methods defined in `Creating and Releasing a Pasteboard` section. For each pasteboard, we could add multiple pasteboard items using [NSPasteboardType](https://developer.apple.com/documentation/appkit/nspasteboardtype?language=objc). In Chromium we only use the [generalPasteboard ](https://developer.apple.com/documentation/appkit/nspasteboard/1530091-generalpasteboard?language=objc)to read/write a single `Clipboarditem`. So, I think multiple clipboards is applicable to both Linux and macOS.

-- 
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/pull/158#discussion_r730153757

Received on Friday, 15 October 2021 22:24:38 UTC