WebView2.NavigationStarting Evento
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Se produce cuando el marco principal de WebView2 navega a un URI diferente.
// Register
event_token NavigationStarting(TypedEventHandler<WebView2, CoreWebView2NavigationStartingEventArgs const&> const& handler) const;
// Revoke with event_token
void NavigationStarting(event_token const* cookie) const;
// Revoke with event_revoker
WebView2::NavigationStarting_revoker NavigationStarting(auto_revoke_t, TypedEventHandler<WebView2, CoreWebView2NavigationStartingEventArgs const&> const& handler) const;
public event TypedEventHandler<WebView2,CoreWebView2NavigationStartingEventArgs> NavigationStarting;
function onNavigationStarting(eventArgs) { /* Your code */ }
webView2.addEventListener("navigationstarting", onNavigationStarting);
webView2.removeEventListener("navigationstarting", onNavigationStarting);
- or -
webView2.onnavigationstarting = onNavigationStarting;
Public Custom Event NavigationStarting As TypedEventHandler(Of WebView2, CoreWebView2NavigationStartingEventArgs)
Tipo de evento
Comentarios
Los redireccionamientos también generan este evento y el identificador de navegación es el mismo que el original.