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

@annevk 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.
+  A web author needs to create a |data| which is a [=ClipboardItems=] object in order to write content to multiple clipboards using the {{Clipboard/write(data)}} method. {{Clipboard/read()}} returns a [=Promise=] to [=ClipboardItems=] object
+  that represents contents of multiple clipboards. A [=ClipboardItem=] can be read from [=ClipboardItems=], which then can be used to read a specific |type| using {{ClipboardItem/getType(type)}}.
+  <dl class=note>

Is this meant to be the developer-facing documentation? In WHATWG standards we use a dedicated "domintro" class for that, but the contents are non-normative so note could work I suppose.

-- 
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_r737356325

Received on Wednesday, 27 October 2021 11:09:22 UTC