According to my research:
- "WebView" can disable "opening links in new windows/tabs".
- WebView is used by native app developers to display webpages within their app(see Twitter's app).
- Detecting WebView via user agent doesn't work consistently and isn't a best practice anyway.
- Simply attempting to open a new window with JS triggers popup blockers; making it an unreliable way to test if a new window can be opened.
I need to detect when this feature is not available. Impossible?
Additional Explanation
I'm trying to detect whether I can open a new window via target=_blank. For example, UIWebView [in-app browser] can prevent target=_blank from working as expected [it simply opens in the same window instead of a new one]. I need a solution to indicate when a new window can't be opened because of browser limitations such as in the UIWebView case. Unfortunately popup blockers prevent checking such functionality because they never allow a new window to be opened without user input(ie. a click) to be bypassed.
<uses-permission android:name="android.permission.INTERNET" />
? – Broomeif (window.allownew)
-- a "feature check" and there is nothing deterministic like that – Type