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

@snianu commented on this pull request.



>  
-    Promise<Blob> getType(DOMString type);
-  };
+    <pre class="example javascript" highlight=js>
+     const format1 = 'text/plain';
+     const promise_text_blob = Promise.resolve(new Blob(['hello'], {type: format1}));
+     const clipboardItemInput = new ClipboardItem(
+      {[format1]: promise_text_blob},
+      {presentationStyle: "unspecified"});
+    </pre>
+
+   <dt><code><var>clipboardItem</var>.getType(<var>type</var>)</code>
+   <dd><p>Returns a [=Promise=] to the {{Blob}} corresponding to <var>type</var>.</p>
+
+   <dt><code><var>clipboardItem</var>.<var>types</var></code>
+   <dd><p>Returns the list of <var>types</var> contained in the <var>clipboardItem</var> object.

Done.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/pull/158#discussion_r787275407
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/clipboard-apis/pull/158/review/856146646@github.com>

Received on Wednesday, 19 January 2022 01:17:18 UTC