This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
async clipboard article does cover Chrome's use of Promise #9806
Labels
content update
for issues that do not require new content (only for updates to existing content)
P2
A normal priority task. This is the default for most issues.
Describe the bug
Chrome now supports writiing a
Promise
to the clipboard. The current docs only mention that for WebKit (at the bottom of the section on "write" .It seems like synchronously setting a promise is the better way to do async clipboard copy. By using an async event handler, you risk overwriting an entry in the clipboard that was set before your async handler completed.
E.g. if the async handler waits for some other async event (e.g. a network request) before setting the clipboard, the clipboard could have been updated already.
The text was updated successfully, but these errors were encountered: