Skip to content

Latest commit

 

History

History
74 lines (46 loc) · 2.39 KB

iwebview2navigationstartingeventargs.md

File metadata and controls

74 lines (46 loc) · 2.39 KB
description title author ms.author ms.date ms.topic keywords
Event args for the NavigationStarting event.
WebView2 Win32 C++ IWebView2NavigationStartingEventArgs
MSEdgeTeam
msedgedevrel
10/07/2020
reference
IWebView2, IWebView2WebView, webview2, webview, win32 apps, win32, edge

interface IWebView2NavigationStartingEventArgs

[!INCLUDE deprecation-note]

interface IWebView2NavigationStartingEventArgs
  : public IUnknown

Event args for the NavigationStarting event.

Summary

Members Descriptions
get_Uri The uri of the requested navigation.
get_IsUserInitiated True when the navigation was initiated through a user gesture as opposed to programmatic navigation.
get_IsRedirected True when the navigation is redirected.
get_RequestHeaders The HTTP request headers for the navigation.
get_Cancel The host may set this flag to cancel the navigation.
put_Cancel Set the Cancel property.

Members

get_Uri

The uri of the requested navigation.

public HRESULT get_Uri(LPWSTR * uri)

get_IsUserInitiated

True when the navigation was initiated through a user gesture as opposed to programmatic navigation.

public HRESULT get_IsUserInitiated(BOOL * isUserInitiated)

get_IsRedirected

True when the navigation is redirected.

public HRESULT get_IsRedirected(BOOL * isRedirected)

get_RequestHeaders

The HTTP request headers for the navigation.

public HRESULT get_RequestHeaders(IWebView2HttpRequestHeaders ** requestHeaders)

Note, you cannot modify the HTTP request headers in a NavigationStarting event.

get_Cancel

The host may set this flag to cancel the navigation.

public HRESULT get_Cancel(BOOL * cancel)

If set, it will be as if the navigation never happened and the current page's content will be intact. For performance reasons, GET HTTP requests may happen, while the host is responding. This means cookies can be set and used part of a request for the navigation.

put_Cancel

Set the Cancel property.

public HRESULT put_Cancel(BOOL cancel)