Created
February 23, 2013 06:11
-
-
Save mrkev/5018658 to your computer and use it in GitHub Desktop.
Requires the URL calls to be intercepted from the WebView. See https://gist.github.com/mrkev/4602188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App = new Object(); | |
// Send message to application | |
// with the format osx:selector:attr1:attr2:etc... | |
App.sel = function (sel){ | |
var iframe = document.createElement('iframe'); | |
iframe.setAttribute('src', 'osx:' + sel); | |
document.documentElement.appendChild(iframe); | |
iframe.parentNode.removeChild(iframe); | |
iframe = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment