WebView2.NavigationCompleted 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当 WebView2 已完全加载 (body.onload 已引发) 或加载停止并出错时发生。
// Register
event_token NavigationCompleted(TypedEventHandler<WebView2, CoreWebView2NavigationCompletedEventArgs const&> const& handler) const;
// Revoke with event_token
void NavigationCompleted(event_token const* cookie) const;
// Revoke with event_revoker
WebView2::NavigationCompleted_revoker NavigationCompleted(auto_revoke_t, TypedEventHandler<WebView2, CoreWebView2NavigationCompletedEventArgs const&> const& handler) const;
public event TypedEventHandler<WebView2,CoreWebView2NavigationCompletedEventArgs> NavigationCompleted;
function onNavigationCompleted(eventArgs) { /* Your code */ }
webView2.addEventListener("navigationcompleted", onNavigationCompleted);
webView2.removeEventListener("navigationcompleted", onNavigationCompleted);
- or -
webView2.onnavigationcompleted = onNavigationCompleted;
Public Custom Event NavigationCompleted As TypedEventHandler(Of WebView2, CoreWebView2NavigationCompletedEventArgs)