Dela via


WebView.FrameNavigationStarting Event

Definition

Occurs before a frame in the WebView navigates to new content.

// Register
event_token FrameNavigationStarting(TypedEventHandler<WebView, WebViewNavigationStartingEventArgs const&> const& handler) const;

// Revoke with event_token
void FrameNavigationStarting(event_token const* cookie) const;

// Revoke with event_revoker
WebView::FrameNavigationStarting_revoker FrameNavigationStarting(auto_revoke_t, TypedEventHandler<WebView, WebViewNavigationStartingEventArgs const&> const& handler) const;
public event TypedEventHandler<WebView,WebViewNavigationStartingEventArgs> FrameNavigationStarting;
function onFrameNavigationStarting(eventArgs) { /* Your code */ }
webView.addEventListener("framenavigationstarting", onFrameNavigationStarting);
webView.removeEventListener("framenavigationstarting", onFrameNavigationStarting);
- or -
webView.onframenavigationstarting = onFrameNavigationStarting;
Public Custom Event FrameNavigationStarting As TypedEventHandler(Of WebView, WebViewNavigationStartingEventArgs) 
<WebView FrameNavigationStarting="eventhandler"/>

Event Type

Remarks

You can cancel navigation in a handler for this event by setting the WebViewNavigationStartingEventArgs.Cancel property to true.

WebView navigation events occur in the following order:

Similar events occur in the same order for each iframe in the WebView content:

Applies to

See also