Asynchronous Clipboard API
The clipboard spec now has an asynchronous API [2] which is significantly more ergonomic than past clipboard APIs – it avoids various issues that the old document.execCommand("copy") approach had, and is much easier to use:
navigator.clipboard.writeText("hello world").then(...);
IE 9/10/11 shipped an unstandardized API for copying text or URLs to the clipboard. Edge shipped an older version of the draft standard clipboard/editing-spec-based-API [1], but it has numerous bugs and inconsistencies [2] that even *make it impossible to tell if the attempted copy action has succeeded*. Existing bugs aren't seeing attention, and it seems likely to me that there are more undiscovered bugs due to baggage of the abandoned editing spec [3].
I maintain a library where I try work around the Edge bugs, but it would be better for developers if they could use the simple asynchronous API directly, at least for copying plain text.
[1] https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6515107-clipboard-api
[2] https://github.com/lgarron/clipboard-polyfill/blob/master/experiment/Conclusions.md#test-results https://github.com/lgarron/clipboard-polyfill#limitations
[3] https://w3c.github.io/editing/execCommand.html
