IWebViewControl.NewWindowRequested IWebViewControl.NewWindowRequested IWebViewControl.NewWindowRequested IWebViewControl.NewWindowRequested IWebViewControl.NewWindowRequested Event

Definition

Occurs when a user performs an action in the IWebViewControl that causes content to be opened in a new window.

public : event TypedEventHandler<IWebViewControl, WebViewControlNewWindowRequestedEventArgs> NewWindowRequested
// Register
event_token NewWindowRequested(TypedEventHandler<IWebViewControl, WebViewControlNewWindowRequestedEventArgs> const& handler) const;

// Revoke with event_token
void NewWindowRequested(event_token const& cookie) const;

// Revoke with event_revoker
NewWindowRequested_revoker NewWindowRequested(auto_revoke_t, TypedEventHandler<IWebViewControl, WebViewControlNewWindowRequestedEventArgs> const& handler) const;
public event TypedEventHandler<IWebViewControl, WebViewControlNewWindowRequestedEventArgs> NewWindowRequested
Public Event NewWindowRequested As TypedEventHandler (Of IWebViewControl, WebViewControlNewWindowRequestedEventArgs)
function onNewWindowRequested(eventArgs){/* Your code */}


iWebViewControl.addEventListener("newWindowRequested", onNewWindowRequested);
iWebViewControl.removeEventListener("newWindowRequested", onNewWindowRequested);

Remarks

This event occurs only for user initiated actions. By default, when a user clicks a link in a IWebViewControl that requests to open in a new window, the link launches the default browser. A new window can be caused by the user clicking on an href, or a button which calls window.open.

Handle this event to provide custom handling of the new window request. You might navigate the IWebViewControl to the desired page, or create a new IWebViewControl in your app to display the requested content. If you provide custom handling of the new window request, set the Handled property to true to prevent the default browser from being launched.