zenorocha / clipboard.js

:scissors: Modern copy to clipboard. No Flash. Just 3kb gzipped :clipboard:
https://clipboardjs.com
MIT License
33.98k stars 3.98k forks source link

Transition from document.execCommand to navigator.clipboard #825

Closed vincentdo closed 1 year ago

vincentdo commented 1 year ago

💥 Proposal

Is your feature request related to a problem? Please describe document.execCommand is being deprecated. navigator.clipboard.readText and writeText are already supported in all browsers so we should be able to just replace the implementation.

Describe the solution you'd like Replace document.execCommand with navigator.clipboard.readText/writeText

Describe alternatives you've considered None

Are you able to assist to bring the feature to reality? I can try

Additional context https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard

Have you read the Contributing Guidelines on issues?

Yes