4 ms·
It didn't use to be possible to manipulate the clipboard at all using Javascript, so sites would embed tiny flash applets to make "Copy to Clipboard" buttons.
by AlphaWeaver 7y ago
It didn't use to be possible to manipulate the clipboard at all using Javascript, so sites would embed tiny flash applets to make "Copy to Clipboard" buttons.
Now it is possible to copy text to the clipboard using the HTML5 Clipboard API [0], (I think it might still have to be triggered based on a user input event, but I'm not positive), but reading the clipboard is still not possible, for the aforementioned security reasons.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_A...