Created
May 6, 2016 13:38
-
-
Save kbshl/eb95417b6eb9b2565cfcbb8a82786b8a to your computer and use it in GitHub Desktop.
Open links in browser from titanium web view, originally from: http://tiinfopot.blogspot.de/2015/03/open-links-in-browser-from-titanium-web.html
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
$.webview.url="http://www.w3schools.com/"; | |
$.webview.addEventListener('beforeload', function(e) { | |
if (e.url != $.webview.url) { | |
e.bubble = false; | |
$.webview.stopLoading(); | |
Ti.Platform.openURL(e.url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment