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

@annevk commented on this pull request.

I'm afraid this isn't really what is needed here.

I recommend looking at something like https://fetch.spec.whatwg.org/#headers-class to see what it takes to define a class.

> @@ -621,8 +621,51 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn;
   };
   </pre>
 
-  <div id="clipboard-idl" dfn-for="Clipboard">
+  <dfn>ClipboardItemDataType</dfn>
+  <p>
+   Returns a {{DOMString}} or [=Blob=] type.
+  </p>

I'm not sure this makes sense. It's a type. It doesn't return anything.

> +   Returns a [=Promise=] to the [=ClipboardItemDataType=].
+  </p>
+
+  {{ClipboardItem}}
+  <p> A {{ClipboardItem}} object contains the {{ClipboardItem/types}} listed in the [=mandatory data types=] list that are present on the [=system clipboard=].
+  <p> The {{ClipboardItem/constructor()}} step for <code>new ClipboardItem(<var>items</var>, <var>options</var>)</code>
+  is to set [=this=]'s items to <var>items</var> and options to <var>options</var>
+  </p>
+
+  Issue: Add definition to clarify what {{ClipboardItem/createDelayed()}} method does. From the discussions it looks like a Windows/Mac only feature where the
+  platform supports writing of the data to the system clipboard in a delayed fashion so the system clipboard can request data on-demand.
+  See https://docs.microsoft.com/en-us/windows/win32/dataxchg/clipboard-operations#delayed-rendering
+
+  <dfn>presentationStyle</dfn>
+  <p>It is an <a href=https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute>enumerated attribute</a> whose keywords are the <code>string</code>, <code>unspecified</code>, <code>inline</code> and <code>attachment</code>.
+  The IDL attribute must [=reflect=] the respective content attributes of the same name.</p>

This is not an element so usage of reflect or content attributes seems incorrect. ClipboardItem needs to have its data model described, then there needs to be an algorithm to create one, and then all these getter things need to return things from that underlying data model.

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

Received on Tuesday, 5 October 2021 07:48:55 UTC