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

@mbrodesser requested changes on this pull request.

Thanks for working on this.

I've only reviewed the first paragraphs, will try to find more time next week.

> +    a user gesture event and the user must select the paste option from the native context menu that pops up
+    when read() is called from JS, otherwise, the promise will be rejected.
+
+    1. If |r| is not "granted", then [=a promise rejected with=] "NotAllowedError" DOMException in |realm|.
+
+    1. Let |itemList| and |cleanItemList| be an empty sequence<{{Blob}}>.
+
+    1. Let |clipboardItemList| be an empty [=ClipboardItems=].
+
+    1. For each |clipboardItem| in |data|:
+
+     1. For each |item| in |clipboardItem|:
+
+      1. Let |p1| be [=a new promise=] to {{Blob}} in |realm|.
+
+      1. If |p1| is [=reject=]d, then throw "Promises to Blobs were rejected." DOMException in |realm|.

Typo: rejectd -> rejected.

>  
-    readonly attribute FrozenArray<DOMString> types;
+   dictionary ClipboardItemOptions {
+    PresentationStyle presentationStyle = "unspecified";
+   };
+  </pre>
+  <p><dfn>Clipboard Item</dfn></p>
+  A [=clipboard item=] is conceptually data that the user has expressed a desire to make shareable by invoking a "cut" or "copy" command.

"from a spreadsheet" -> "from a spreadsheet of a native application".

>  
-    readonly attribute FrozenArray&lt;DOMString> types;
+   dictionary ClipboardItemOptions {
+    PresentationStyle presentationStyle = "unspecified";
+   };
+  </pre>
+  <p><dfn>Clipboard Item</dfn></p>
+  A [=clipboard item=] is conceptually data that the user has expressed a desire to make shareable by invoking a "cut" or "copy" command.
+  For example, if a user copies a range of cells from a spreadsheet, it will result in one [=clipboard item=]. If a user copies a set of files from their desktop, that list of files will be a different single [=clipboard item=].

Since this is about multiple clipboard items, it seems to belong to section 7.3.1. ClipboardItems.

>  
-    readonly attribute FrozenArray&lt;DOMString> types;
+   dictionary ClipboardItemOptions {
+    PresentationStyle presentationStyle = "unspecified";
+   };
+  </pre>
+  <p><dfn>Clipboard Item</dfn></p>
+  A [=clipboard item=] is conceptually data that the user has expressed a desire to make shareable by invoking a "cut" or "copy" command.
+  For example, if a user copies a range of cells from a spreadsheet, it will result in one [=clipboard item=]. If a user copies a set of files from their desktop, that list of files will be a different single [=clipboard item=].

"If a user copies a set of files from their desktop, that list of files will be a different single [=clipboard item=]." -> [...], that list of files will be represented by multiple clipboard items.

>  
-    readonly attribute FrozenArray&lt;DOMString> types;
+   dictionary ClipboardItemOptions {
+    PresentationStyle presentationStyle = "unspecified";
+   };
+  </pre>
+  <p><dfn>Clipboard Item</dfn></p>
+  A [=clipboard item=] is conceptually data that the user has expressed a desire to make shareable by invoking a "cut" or "copy" command.
+  For example, if a user copies a range of cells from a spreadsheet, it will result in one [=clipboard item=]. If a user copies a set of files from their desktop, that list of files will be a different single [=clipboard item=].
+  Some platforms may support having more than one [=clipboard item=] at a time on the [=Clipboard=], while other platforms replace the previous [=clipboard item=] with the new one. 
+
+  Each [=clipboard item=] can be represented as multiple mime-types. In the example where the user copies a range of cells from a spreadsheet, it may be represented as an image (image/png), an HTML table (text/html), or plain text (text/plain).

Nit-picking: "Each" -> "a" since this section is about one clipboard item.

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

Received on Friday, 5 November 2021 13:51:02 UTC