w3c / clipboard-apis

Clipboard API and events
https://w3c.github.io/clipboard-apis/
Other
150 stars 36 forks source link

Async Clipboard API take more time compared to DataTransfer API to read/write data in System Clipboard #190

Closed amitavak closed 1 year ago

amitavak commented 1 year ago

We observed that the async clipboard api (navigator.clipboard.read or navigator.clipboard.write) take more time to read/write data in system clipboard.

I have created the below sample app in glitch.

Code link: https://glitch.com/edit/#!/capable-lacy-shroud Live site: https://capable-lacy-shroud.glitch.me

As you can see with DataTransfer API it takes ~1 ms to copy and ~30 ms to paste. But it takes ~650 ms to copy and ~300 ms to paste when we use Async Clipboard API.

snianu commented 1 year ago

Looks like this is a chromium issue so I opened a bug for investigation: https://bugs.chromium.org/p/chromium/issues/detail?id=1475750. Closing this issue as this has nothing to do with the clipboard web API spec.