- From: mbrodesser <notifications@github.com>
- Date: Tue, 07 Dec 2021 02:37:12 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 December 2021 10:37:25 UTC
@mbrodesser commented on this pull request. > + Creates a new {{ClipboardItem}} object. <var>items</var> are used to fill its MIME types and [=Promise=]s to [=Blob=]s or {{DOMString}}s corresponding to the MIME types, <var>options</var> can be used to fill its {{ClipboardItemOptions}}, + as per the example below. - readonly attribute PresentationStyle presentationStyle; - readonly attribute long long lastModified; - readonly attribute boolean delayed; + <pre class="example javascript" highlight=js> + const format1 = 'text/plain'; + const promise_text_blob = Promise.resolve(new Blob(['hello'], {type: format1})); + const clipboardItemInput = new ClipboardItem( + {[format1]: promise_text_blob}, + {presentationStyle: "unspecified"}); + </pre> This looks like a note for web-developers. It seems it should be encapsulated in a "domintro" class. See https://wiki.whatwg.org/wiki/Specs/howto#IDL. That will create a "For web developers (non-normative)" box, as it can for instance be seen at https://fetch.spec.whatwg.org/. `types` and `getType` below should be changed in the same way. -- 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-825090228
Received on Tuesday, 7 December 2021 10:37:25 UTC