I have a problem with my extension. I want to paste data from the clipboard.
So far, I\'ve got this:
function
Calling document.execCommand("paste") is not supported by "reasonable" browsers, because of security concerns as it might enable the script to read sensitive data (like passwords) from the clipboard.
This is the compatibility matrix of document.execCommand("...") concerning clipboard events:
| "copy" | "paste" | "cut"
--------+--------+---------+--------
IE | OK | OK | n/a
--------+--------+---------+--------
Edge | OK | n/a | OK
--------+--------+---------+--------
Firefox | OK | n/a | OK
--------+--------+---------+--------
Chrome | OK | n/a | OK
My two cents to this:
You can feature detect the possible commands using the document.queryCommandSupported method.