title: Messaging directly from web page in Safari like Chrome
body: <p>Is there any way to post messages directly from web pages to global page like Chrome's </p>
  
  <pre><code>chrome.runtime.sendMessage, chrome.runtime.onMessageExternal
  </code></pre>
  
  <p><a href="https://developer.chrome.com/extensions/messaging" rel="nofollow">API functions</a> in Safari? </p>
  
  <p>I've used AngularJS in my web app, and can't think of any clean way integrating it with injected scripts to pass messages to background. My web app is going to initiate some commands to background and get results basically. Currently, trying to convert my Chrome extension to Safari.</p>
  
  <p>Or is there any way my Angular controller speak with injected script if above approach is not possible so that Angular be responsible for updating DOM not injected script?</p>