Re: [w3ctag/design-reviews] Delayed Clipboard Rendering (Issue #925)

If that's the case, then why do you even have to add a callback at all? Couldn't the author simply pass an unresolved promise to the ClipboardItem constructor and the promise gets resolved at paste time?

e.g.: 
```
async generateExpensiveBlob(): Promise<Blob> {
    return new Blob(...);
}

const clipboardItemInput = new ClipboardItem({
                            'text/plain': generateExpensiveBlob(),
                           });
navigator.clipboard.write([clipboardItemInput]);
```

Gets you delayed rendering, no?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/925#issuecomment-1939855319
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/925/1939855319@github.com>

Received on Tuesday, 13 February 2024 00:18:39 UTC