title: Impossible to load an iframe inside the background page (status=canceled)
body: <p>I want to dynamicaly inject and load an iframe inside the background page. But every time, the request is canceled.</p>
  
  <p><a href="https://i.imgur.com/Puto33c.png" rel="nofollow noreferrer">http://i.imgur.com/Puto33c.png</a></p>
  
  <p>That used to work a week ago. I don't know where I'm wrong. </p>
  
  <p>To reproduce this issue, I created a small extension : </p>
  
  <p><em>manifest.js :</em></p>
  
  <pre class="lang-json prettyprint-override"><code>{
      "name": "iframe background",
      "version": "1.0.0",
      "manifest_version": 2,
  
      "browser_action": {
          "default_title": "iframe"
      },
  
      "background": {
          "persistent": false,
          "scripts": ["background.js"]
      }
  }
  </code></pre>
  
  <p><em>background.js :</em></p>
  
  <pre class="lang-js prettyprint-override"><code>chrome.browserAction.onClicked.addListener(function() {
      var iframe = document.createElement('iframe');
      iframe.src = 'http://localhost:3000/';
      iframe.onload = function() {
          console.log(iframe.contentDocument); // return null
      };
      document.body.appendChild(iframe);
  });
  </code></pre>
  
  <p>The page to load is not blocked by X-Frame-Options SAMEORIGIN. </p>
  
  <p>I tried to put the iframe directly within a HTML background page with no luck. </p>
  
  <p>I also tried to add an content_security_policy : 
  <code>"content_security_policy": "script-src 'self'; object-src 'self'; frame-src 'self' http://localhost:3000/"</code></p>
  
  <p>But the iframe still doesn't load.</p>
  
  <p>Does someone has a workaround or a solution to this problem?</p>
  
  <p>Thanks !</p>