title: Send data from contents script to main.js in Firefox SDK extension with ports
body: <p>I'm developing simple FF SDK Add-on, my current goal is to pass hooked link from webpage to Add-on's code and open Add-on's tab.</p>
  
  <p>Manual <a href="https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/using_port" rel="nofollow">https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/using_port</a> tells me that using self.port.emit()&amp; self.port.on() is an appropriate way for this. self.port.emit() called in my content script embedded into webpage by PageMod but in main.js I've stumbled with "self.port is undefined" in the window where cfx run is running. Below is snipped:</p>
  
  <pre><code>var pageMod = require("sdk/page-mod");
  var self = require("sdk/self");
  
  pageMod.PageMod({
    include: "*", // &lt;- this tell firefox to attach the following
                  //    content script to all web pages
    contentScriptFile: self.data.url("js/script.js")
  });
  
  
  
  self.port.on("gotLink", function(myAddonMessagePayload) {
  var tabs = require("sdk/tabs");
  tabs.open({
    url: self.data.url("page.html"),
  });
  });
  </code></pre>
  
  <p>probably self.port is not that self that got from var self = require("sdk/self")? then, how do I get right 'self' to listen recieve data from content script?</p>