interface IWebView2PermissionRequestedEventArgs
Note
This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.
interface IWebView2PermissionRequestedEventArgs
: public IUnknown
Event args for the PermissionRequested event.
Summary
Members | Descriptions |
---|---|
get_Uri | The origin of the web content that requests the permission. |
get_PermissionType | The type of the permission that is requested. |
get_IsUserInitiated | True when the permission request was initiated through a user gesture. |
get_State | The status of a permission request, i.e. |
put_State | Set the State property. |
GetDeferral | GetDeferral can be called to return an IWebView2Deferral object. |
Members
get_Uri
The origin of the web content that requests the permission.
public HRESULT get_Uri(LPWSTR * uri)
get_PermissionType
The type of the permission that is requested.
public HRESULT get_PermissionType(WEBVIEW2_PERMISSION_TYPE * value)
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_State
The status of a permission request, i.e.
public HRESULT get_State(WEBVIEW2_PERMISSION_STATE * value)
whether the request is granted. Default value is WEBVIEW2_PERMISSION_STATE_DEFAULT.
put_State
Set the State property.
public HRESULT put_State(WEBVIEW2_PERMISSION_STATE value)
GetDeferral
GetDeferral can be called to return an IWebView2Deferral object.
public HRESULT GetDeferral(IWebView2Deferral ** deferral)
Developer can use the deferral object to make the permission decision at a later time.