Computer Software Projects DISCUSSION

How to verify if target=_blank worked in Android webview

Started by syedzainnasir How to verify if target=_blank worked in Android webview
0 replies 248 views 1 participants
Latest activity · 09 Mar 2017

How to verify if target=_blank worked in Android webview

syedzainnasir Computer Software Projects Forum
#1
There is an Android app which uses HTML content within a WebView. Now, this HTML content contains a target=_blank link. Sometimes it works, but sometimes it gets blocked (i.e. link opens in same window), for unknown reasons.
[code]<!-- Does not always work in WebView --> <a id="link" href="http://example.com" target="_blank">link</a> $('#link').click(function() { // if (linkOpenedInNewBrowserWindow.wasSuccessful) // Do something });[/code] How is it possible to check whether a click on this link actually opens the link in a new browser window or not?

Community replies 0

Be the first to help

There are no replies yet.

TEP COMMUNITY