scala-js/scala-js-dom

Support Clipboard API

strelec opened this issue · 2 comments

There appears to be two API, synchronous and the more modern, Promise-based one. We shall support the latter. Can be done post-2.0, once this api is more than 95% supported.

https://developer.mozilla.org/en-US/docs/Web/API/Clipboard

https://caniuse.com/async-clipboard

For posterity.

dom.window.navigator.clipboard.writeText("hi")