Handling links that open in an external window
External Links
Certain links normally open in a new window in typical web-browsers. Links that usually open in an "external window" include:
- Links with a "_blank" target attribute
- Calls to
window.open("http://domain.com")via Javascript - Links requested to be opened via Flash
Handling External Links
You must handle external links yourself-- they are not automatically loaded into a WebView.
You may either choose to load the URL into the same WebView or create a new WebView and load the URL into that instead.
Using C++ API
You can be notified when a user clicks an external link using
WebViewListener in the C++ API. Just override the virtual function
WebViewListener::onOpenExternalLink and then handle
the URL parameter yourself.
Using C# API
You can be notified when a user clicks an external link by using
WebView.OnOpenExternalLink.