title: How to allow async programmatic copy-to-clipboard functionality in FireFox
body: <p>I have a website that allows users to copy information to their clipboard to make other parts of their job easier. My issue is FireFox not allowing async copy-to-clipboard functionality. I need the async feature as the data shown on the screen is not necessarily the data being copied (as per the client's requirements). So, I make a trip to the server to build up the appropriate info and bring it back to the client. This works in Chrome and IE.</p>
  
  <p>The following both always fail in FireFox</p>
  
  <pre><code>document.execCommand("copy")
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>navigator.clipboard.writeText(text)
  </code></pre>
  
  <p>I also tried querying the permission but it tells me the name of the permissions are not recognized:</p>
  
  <p>Either:</p>
  
  <pre><code>navigator.permissions.query({name:'clipboardWrite'})
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>navigator.permissions.query({name:'clipboard-write'})
  </code></pre>
  
  <p>I am aware that extensions/add-ons have additional functionality that can be exposed and accessed but that is not an option for me.</p>
  
  <p>Is there any way to allow web sites to natively request access for the async clipboard functionality in FireFox?</p>