Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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_Uri | The origin of the web content that requests the permission. |
| get_PermissionKind | 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 ICoreWebView2Deferral object. |
Members
get_Uri
The origin of the web content that requests the permission.
public HRESULT get_Uri(LPWSTR * uri)
get_PermissionKind
The type of the permission that is requested.
public HRESULT get_PermissionKind(CORE_WEBVIEW2_PERMISSION_KIND * 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(CORE_WEBVIEW2_PERMISSION_STATE * value)
whether the request is granted. Default value is CORE_WEBVIEW2_PERMISSION_STATE_DEFAULT.
put_State
Set the State property.
public HRESULT put_State(CORE_WEBVIEW2_PERMISSION_STATE value)
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.