how to launch inappbrowser when a webpage is loade

2019-09-10 03:45发布

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条回答
在下西门庆
2楼-- · 2019-09-10 04:41
_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

查看更多
登录 后发表回答