- From: Randall Leeds <notifications@github.com>
- Date: Fri, 24 Mar 2023 18:39:24 -0700
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 25 March 2023 01:39:37 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. Right, that makes sense. Four options, then: - Eager: a `DOMString` or `Blob` - Eager, but asynchronous: a `Promise` of a `DOMString` or `Blob` - Deferred: a callback returning a `DOMString` or `Blob` - Deferred, but asynchronous: a callback returning a `Promise` of a `DOMString` or `Blob` > However, it's apparently not possible for a Promise to be part of a union. If that's the case, then the callback will have to return a promise. That seems okay, but I think it'd be more ergonomic for the application developer to return a value synchronously if they want to. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/417#issuecomment-1483667697 You are receiving this because you are subscribed to this thread. Message ID: <w3c/editing/issues/417/1483667697@github.com>
Received on Saturday, 25 March 2023 01:39:37 UTC