title: Firefox Add-on SDK and Cross-domain
body: <p>I would like to access comment section on youtube with Firefox extension. Since the comment section is in iframe, and it is located on other site(plus.googleapis.com) I need to enable cross-domain function.</p>
  
  <p>I did that by including cross-domain-content in package.json:</p>
  
  <pre><code>{
    "name": "testfirefoxextension",
    "title": "testFirefoxExtension",
    "id": "id removed",
    "description": "nike z youtubu v zvezi",
    "author": "kv1dr",
    "license": "MPL 2.0",
    "version": "0.1",
    "permissions": {
      "cross-domain-content": ["http://www.youtube.com", "https://plus.googleapis.com/"]
    }
  }
  </code></pre>
  
  <p>and just in case, in <code>lib/main.js</code> I added both youtube.com and googleapis.com to include section. This is full content of the <code>lib/main.js</code>:</p>
  
  <pre><code>// Import the page-mod API
  var pageMod = require("sdk/page-mod");
  // Import the self API
  var self = require("sdk/self");
  
  // Create a page mod
  // It will run a script whenever a "youtube.com" URL is loaded
  // The script replaces the page contents with a message
  pageMod.PageMod({
    include: ["*.youtube.com","*.googleapis.com"],
    contentScriptFile: [self.data.url("jquery-2.1.1.min.js"), self.data.url("youtube.js")]
  });
  </code></pre>
  
  <p>in youtube.js I have <code>alert($("#comments-test-iframe").html());</code> just to test, if the cross-domain script is working, but when the comments are loading, the script shows empty message, but when the comments are loaded, the script shows [undefined], instead of the content of the comments section. Why? And how to get the iframe content?</p>