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

@snianu commented on this pull request.



> +
+  <h4 method for=ClipboardItem lt=getType(type)>getType(type)</a> must run the below steps:</h4>
+
+   1. Let |realm| be [=this=]'s [=relevant realm=].
+
+   1. Let |mimeType| be the result of [=parse a mime type=] given |type|.
+
+   1. If |mimeType| is failure, then throw a {{TypeError}}.
+
+   1. Let |itemTypeList| be [=this=]'s [=ClipboardItem/clipboard item=]'s [=list of representations=].
+
+   1. For each |representation| in |itemTypeList|:
+
+    1. If |representation|'s [=mime type=] is |mimeType|, then:
+
+     1. Let |blobData| be a [=Blob=] created using |representation|'s [=data=] and with its {{Blob/type}} set to |mimeType|, [=serialize a MIME type|serialized=].

Done.

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

Received on Monday, 13 December 2021 22:49:22 UTC