admin管理员组文章数量:1400445
I'm using Phonegap 2.3 and I'm considering updating to the newer library. I think this might be a problem that was fixed with the newer library.
Anyway I have tried:
window.open('','_blank')
window.location = "";
Both had no luck forcing the user to load the external link in safari.
I also ready about targeting _system
which didn't work either.
I'm using Phonegap 2.3 and I'm considering updating to the newer library. I think this might be a problem that was fixed with the newer library.
Anyway I have tried:
window.open('http://google.','_blank')
window.location = "http://google.";
Both had no luck forcing the user to load the external link in safari.
I also ready about targeting _system
which didn't work either.
2 Answers
Reset to default 3There is a config.xml setting that will do the trick:
<preference name="stay-in-webview" value="true" />
Or, you can use _system if you include the InAppBrowser plugin.
<a href="#" onclick="window.open('http://www.nhl.', '_system', 'location=yes');">_system</a>
InAppBrowser API Doc
Here's a couple related threads:
https://build.phonegap./docs/config-xml (page search for "stay-in-webview")
PhoneGap Build: how to open external url in device browser on Android?
For Phonegap 3 you have to install the InAppBrowser plugin and then do:
window.open("http://google.", "_system");
本文标签: javascriptPhonegap open external links outside App from a Whitelist URLStack Overflow
版权声明:本文标题:javascript - Phonegap open external links outside App from a Whitelist URL - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744185013a2594249.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论