- From: mbrodesser <notifications@github.com>
- Date: Mon, 15 Nov 2021 02:38:24 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/clipboard-apis/pull/158/review/805895168@github.com>
@mbrodesser commented on this pull request. > - Promise<Blob> getType(DOMString type); - }; + 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 of a native application, it will result in one [=clipboard item=]. If a user copies a set of files from their desktop, that list of files will be represented by multiple [=clipboard item=]s. > So, here I'm describing the conceptual `clipboard item` object's model. This is not relevant to web developers so not sure if this belongs to an Example section. For the general understanding of web developers about the async clipboard API, it seems relevant, see also https://github.com/w3c/clipboard-apis/pull/158#discussion_r747810984. I suggest moving most of the prose of this section, including "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 of a native application, it will result in one clipboard item. If a user copies a set of files from their desktop, that list of files will be represented by multiple clipboard items. 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." to a note (https://respec.org/docs/#note) of the `Clipboard` (not `ClipboardItem`) interface. "A clipboard item has a list of representations, each representation with an associated mime type and data. 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). Each of these mime types describe a different representation of the same clipboard item at different levels of fidelity and make the clipboard item more consumable by target applications during paste. Making the range of cells available as an image will allow the user to paste the cells into a photo editing app, while the text/plain format can be used by text editor apps. A clipboard item can also optionally have a presentation style that helps distinguish whether apps "pasting" a clipboard item should insert the contents of an appropriate representation inline at the point of paste or if it should be treated as an attachment." would be better placed as a note of the `ClipboardItem`interface. This section should then only contain the definition of the conceptual `clipboard item` and the definition of the `constructor`. -- 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_r749197878
Received on Monday, 15 November 2021 10:38:37 UTC