Mozilla provides a number of interfaces for accessing the clipboard. The component @mozilla.org/widget/clipboardhelper;1 can be used to copy text to the clipboard. This component implements the interface nsIClipboardHelper, which has a function copyString that can be used to copy a string. const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.i
![Using the clipboard - Mozilla | MDN](https://cdn-ak-scissors.b.st-hatena.com/image/square/93d09855fe809a1603c1a7e744962280e02863f1/height=288;version=1;width=512/https%3A%2F%2Fdeveloper.mozilla.org%2Fmdn-social-share.2f09512a.png)