7 ms·
Maybe, but I'm pretty sure browsers block the clipboard functions unless they were triggered via user input. I don't know if a page load counts as a valid trigg
by coopsmgoops 6y ago
Maybe, but I'm pretty sure browsers block the clipboard functions unless they were triggered via user input. I don't know if a page load counts as a valid trigger.
- bovine3dom 6y ago`document.execCommand("copy")` works without user input - https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand https://developer.mozilla.org/en-US/docs/Web/API/Document/ex....
- earthboundkid 6y agoNope. > Conditions of having this behavior enabled vary from one browser to another, and have evolved over time. If you're not running based on a click event, you'll certainly fail.
- bovine3dom 6y agoPerhaps extension code gets different rules. This code works in Firefox without needing interaction from the user: https://github.com/tridactyl/tridactyl/blob/5e8f94ff06bd5f143732f2dabd32b08dabf1e65a/src/commandline_frame.ts#L349 https://github.com/tridactyl/tridactyl/blob/5e8f94ff06bd5f14...
- earthboundkid 6y agoExtensions get different rules.