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

@mbrodesser 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}}.

It seems we should add:

`Let |listOfRepresentations| be [=list of representations=].`
`For each |existingRepresentation| in |listOfRepresentations|:
  If |existingRepresentations|'s [=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#pullrequestreview-831574497

Received on Tuesday, 14 December 2021 14:28:00 UTC