Open guaiamum opened 5 years ago
Will this work for all browsers? Don't want to code something that breaks the rest. ;)
The clipboard API is quite recent, but should work on most main browsers. https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#Browser_compatibility
I could add a polyfill with the old approach. How about make it into a Vue component that deals with it all?
Looks like not IE at all. Let's do a try/catch.
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#Browser_compatibility
Okay, don't you think is best to encapsulate this logic, Ui and styles into a Vue component, like this official plugin: https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-back-to-top?