interface ICoreWebView2PermissionRequestedEventArgs

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

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, i.e.
get_Uri The origin of the web content that requests the permission.
GetDeferral GetDeferral can be called to return an ICoreWebView2Deferral object.
put_State Set the State property.

Members

get_IsUserInitiated

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

public HRESULT get_IsUserInitiated(BOOL * isUserInitiated)

Note that being initiated through a user gesture doesn't 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, i.e.

public HRESULT get_State(COREWEBVIEW2_PERMISSION_STATE * state)

whether the request is granted. 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

GetDeferral can be called to return an ICoreWebView2Deferral object.

public HRESULT GetDeferral(ICoreWebView2Deferral ** deferral)

Developer can use the deferral object to make the permission decision at a later time.

put_State

Set the State property.

public HRESULT put_State(COREWEBVIEW2_PERMISSION_STATE state)