Additional webview interfaces

The IWebView interface contains the base webview functionality that is implemented on all platforms. However, there are also additional interfaces that you can use to access advanced functionality on a subset of platforms:

Each interface's documentation lists the platforms that support it. To use an interface, cast the IWebView instance to it. If the platform supports the interface, then the cast will succeed and you can call the interface's methods.


var webViewWithPopups = webViewPrefab.WebView as IWithPopups;
if (webViewWithPopups != null) {
  webViewWithPopups.PopupRequested += (sender, eventArgs) => {
    Debug.Log("Popup requested: " + eventArgs.Url);