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

@domenic commented on this pull request.



> +   1. Let |clipboardItemObject| be a [=new=] {{ClipboardItem}} with |realm|.
+
+   1. Set |clipboardItemObject|'s [=clipboard item=] to |clipboardItem|.
+
+  The <dfn constructor for="ClipboardItem" lt="ClipboardItem(items, options)"><code>new ClipboardItem(<var>items</var>, <var>options</var>)</code></dfn> constructor steps are:
+   1. Set [=this=]'s [=ClipboardItem/clipboardItem=] to a new [=clipboard item=].
+
+   1. Set [=this=]'s [=ClipboardItem/clipboardItem=]'s [=presentation style=] to |options|["{{ClipboardItemOptions/presentationStyle}}"].
+
+   1. Let |types| be a list of {{DOMString}}.
+
+   1. For each (|key|, |value|) in |items|:
+
+    1. Let |mimeType| be the result of [=parsing a MIME type=] given |key|.
+
+    1. If |mimeType| is failure, then throw a {{TypeError}}.

You're completely right. It should be `If [=this=]'s [=ClipboardItem/clipboard item=]'s [=list of representations=] [=list/contains=] a [=representation=] whose [=representation/MIME type=] is |mimeType|, then throw a {{TypeError}}`.

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

Received on Wednesday, 15 December 2021 16:01:50 UTC