title: Dispatch messages from a safari extension popover to the global page
body: <p>I have a safari extension popover that needs to communicate with its global page. From a content-script I am using </p>
  
  <pre><code>safari.self.tab.dispatchMessage(name,data); 
  </code></pre>
  
  <p>to accomplish that. From a popover I didn't find a way to do that. I know that I can access methods in the global page directly</p>
  
  <pre><code>safari.extension.globalPage.contentWindow
  </code></pre>
  
  <p>but my goal was to reuse code fragments that are already used in content-scripts. I do the same for the chrome version of the plugin.</p>
  
  <p>Is there code for a little clever proxy that emulates </p>
  
  <pre><code>safari.self.tab.dispatchMessage(name,data); 
  </code></pre>
  
  <p>from the popover?</p>