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

@snianu commented on this pull request.



>  
-  dictionary ClipboardItemOptions {
-    PresentationStyle presentationStyle = "unspecified";
+   1. Let |p| be a new [=Promise=].
+
+   1. If |type| is not listed in the [=mandatory data types=] list, then reject |p| with a "The type was not found" DOMException.
+
+   1. Let |data| be the result of reading the |type| from the [=system clipboard=].

If it contains a resolved promise, then we resolve |p| with the Blob data. Data should be read from the system clipboard during `read()` as the clipboard could change between `read()` and `getType(type)` (at least that is how its implemented in Chromium).

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

Received on Friday, 15 October 2021 22:28:48 UTC