How To Copy To Clipboard Via Chrome.notification.create With Chrome.notification.onclicked In A Firefox Webextension Add-on?
Testpage: https://www.google.com It works in Chrome but in Firefox Nightly 52.0a1 it gives me this error when clicked on the notification: document.execCommand(‘cut’/‘copy�
Solution 1:
See https://github.com/mdn/webextensions-examples/blob/master/context-menu-copy-link-with-types/clipboard-helper.js#L2 - you can't copy from a background script. Your copyTextToClipboard code works fine when injected into a page like done in the example: https://github.com/mdn/webextensions-examples/blob/master/context-menu-copy-link-with-types/background.js#L31
Post a Comment for "How To Copy To Clipboard Via Chrome.notification.create With Chrome.notification.onclicked In A Firefox Webextension Add-on?"