Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 2.69 KB

icorewebview2permissionrequestedeventargs.md

File metadata and controls

81 lines (50 loc) · 2.69 KB
description title ms.date keywords
Event args for the `PermissionRequested` event.
WebView2 Win32 C++ ICoreWebView2PermissionRequestedEventArgs
02/09/2022
IWebView2, IWebView2WebView, webview2, webview, win32 apps, win32, edge, ICoreWebView2, ICoreWebView2Controller, browser control, edge html, ICoreWebView2PermissionRequestedEventArgs

interface ICoreWebView2PermissionRequestedEventArgs

[!INCLUDE deprecation-note]

interface ICoreWebView2PermissionRequestedEventArgs
  : public IUnknown

Event args for the PermissionRequested event.

Summary

Members Descriptions
get_IsUserInitiated TRUE when the permission request was initiated through a user gesture.
get_PermissionKind The type of the permission that is requested.
get_State The status of a permission request, (for example is the request is granted).
get_Uri The origin of the web content that requests the permission.
GetDeferral Gets an ICoreWebView2Deferral object.
put_State Sets the State property.

Applies to

Product Introduced
WebView2 Win32 0.9.430
WebView2 Win32 Prerelease 0.9.488

Members

get_IsUserInitiated

TRUE when the permission request was initiated through a user gesture.

public HRESULT get_IsUserInitiated(BOOL * isUserInitiated)

Note

Being initiated through a user gesture does not mean that user intended to access the associated resource.

get_PermissionKind

The type of the permission that is requested.

public HRESULT get_PermissionKind(COREWEBVIEW2_PERMISSION_KIND * permissionKind)

get_State

The status of a permission request, (for example is the request is granted).

public HRESULT get_State(COREWEBVIEW2_PERMISSION_STATE * state)

The default value is COREWEBVIEW2_PERMISSION_STATE_DEFAULT.

get_Uri

The origin of the web content that requests the permission.

public HRESULT get_Uri(LPWSTR * uri)

GetDeferral

Gets an ICoreWebView2Deferral object.

public HRESULT GetDeferral(ICoreWebView2Deferral ** deferral)

Use the deferral object to make the permission decision at a later time.

put_State

Sets the State property.

public HRESULT put_State(COREWEBVIEW2_PERMISSION_STATE state)