问题
I am launching a web page in worklight 6.2 container (for android and ios) by clicking a button on index.html page. In my web page I have used window.open(url,"_blank","location=yes")
to launch an external website in inappbrowser, however it launches in the webview instead of inappbrowser. I assume this is happening because I am loosing cordova plugins when ever the webpage is loaded in my webview. When I write window.open(url,"_blank","location=yes")
I am able to launch external url in inappbrowser. Is there any way to have same behavior of launching the inappbrowser from a webpage in cordova/worklight webview.
回答1:
_self: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
_blank: Opens in the InAppBrowser.
_system: Opens in the system's web browser.
use self instead of blank
来源:https://stackoverflow.com/questions/25373600/how-to-launch-inappbrowser-when-a-webpage-is-loaded-in-webview