title: why document.execCommand("copy") doesn't work in content script of my chrome extension?
body: <p>I want to write some data in to clipborad from a chrome extension which I'm creating.
  In the manifest file i gave permissions to both <strong>clipboardRead and clipboardWrite.</strong> </p>
  
  <p>i use this function which i found <a href="https://stackoverflow.com/a/11527906/2095705">here</a> </p>
  
  <p>but it doesn't work. seems that "document.execCommand('copy');" can not work.</p>
  
  <p>i write all of these codes in content script. </p>
  
  <p>thx
  manifest:</p>
  
  <pre><code>{
      "manifest_version":2,
  
      "name":"easyCopy",
      "description":"just a small toll",
      "version":"1.0.0",
  
      "permissions":[
          "clipboardWrite", "http://*/*", "clipboardRead"
      ],
  
      "content_scripts":[
          {
              "matches":["http://*/*"],
              "js":["jquery-1.9.1.min.js", "main_feature.js"]
          }
      ],
  
      "background":{
          "persistent":false,
          "page":"background.html"
      }
  }
  </code></pre>
  
  <p>main_feature.js:</p>
  
  <pre><code>copyOrderId();
  function copyOrderId() {
      $(".order-num").click(function () {
          var curOrderNum = $(this).text();
          copyTextToClipboard(curOrderNum);
  //        chrome.extension.sendMessage({method:"copy", content:curOrderNum}, function (response) {
  //            clog(response);
  //        });
      });
  
  
  }
  
  function copyTextToClipboard(text) {
      var copyFrom = $('&lt;textarea/&gt;');
      copyFrom.text(text);
      $('body').append(copyFrom);
      copyFrom.select();
      document.execCommand('copy', true);
      copyFrom.remove();
  
  }
  function clog(message) {
      console.log(message);
  }
  </code></pre>
  
  <p>the background.html is just a blank page with basic html body.</p>