- From: Evan Stade <notifications@github.com>
- Date: Fri, 24 Mar 2023 18:33:15 -0700
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 25 March 2023 01:33:27 UTC
> Is there any value in having the clipboard item data ever be a Promise? Yes, because we want to allow sites to construct the data asynchronously, but eagerly. (Which is how the API currently behaves.) I believe what we actually would like is: ``` typedef (Blob or DOMString) ClipboardItemValue; callback ClipboardItemValueCallback = Promise<ClipboardItemValue>(); typedef (ClipboardItemValueCallback or Promise<ClipboardItemValue>) ClipboardItemData; constructor(record<DOMString, ClipboardItemData> items); ``` However, it's apparently not possible for a Promise to be part of a union. Thus I think the next best option is to be able to provide additional data to the `ClipboardItem` with setter methods rather than in the ctor. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/417#issuecomment-1483665810 You are receiving this because you are subscribed to this thread. Message ID: <w3c/editing/issues/417/1483665810@github.com>
Received on Saturday, 25 March 2023 01:33:27 UTC