ICoreWebView2NavigationCompletedEventArgs2

Undocumented in source.
version(Windows && inline_webview2_bindings && all)
interface ICoreWebView2NavigationCompletedEventArgs2 : ICoreWebView2NavigationCompletedEventArgs {
static const
GUID iid;
}

Members

Functions

get_HttpStatusCode
HRESULT get_HttpStatusCode(int* http_status_code)

The HTTP status code of the navigation if it involved an HTTP request. For instance, this will usually be 200 if the request was successful, 404 if a page was not found, etc. See https://developer.mozilla.org/docs/Web/HTTP/Status for a list of common status codes.

Inherited Members

From ICoreWebView2NavigationCompletedEventArgs

get_IsSuccess
HRESULT get_IsSuccess(BOOL* isSuccess)

TRUE when the navigation is successful. FALSE for a navigation that ended up in an error page (failures due to no network, DNS lookup failure, HTTP server responds with 4xx), but may also be FALSE for additional scenarios such as window.stop() run on navigated page. Note that WebView2 will report the navigation as 'unsuccessful' if the load for the navigation did not reach the expected completion for any reason. Such reasons include potentially catastrophic issues such network and certificate issues, but can also be the result of intended actions such as the app canceling a navigation or navigating away before the original navigation completed. Applications should not just rely on this flag, but also consider the reported WebErrorStatus to determine whether the failure is indeed catastrophic in their context. WebErrorStatuses that may indicate a non-catastrophic failure include: - COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED

get_WebErrorStatus
HRESULT get_WebErrorStatus(COREWEBVIEW2_WEB_ERROR_STATUS* webErrorStatus)

The error code if the navigation failed.

get_NavigationId
HRESULT get_NavigationId(UINT64* navigationId)

The ID of the navigation.

Meta