Tuesday, January 29, 2013

Safari. How to send message from popover to global

In essence you don't need to because you still have access to the safari.extension object in your popover.

So instead of sending a message 'foo' you can simply make a function inside your global page called 'foo()' and call it like so from your popover:

safari.extension.globalPage.contentWindow.foo();


Read this thread:

http://stackoverflow.com/questions/12663743/how-do-i-pass-a-message-from-a-safari-extension-popover-to-the-global-page

No comments:

Post a Comment