OnPermissionRequested
Interface AntView
Type: Event
Parameters: Boolean UserInitiated TxPermissionKind PermissionKind TxPermissionState* State String Uri Boolean* Handled Boolean* SavesInProfile
Triggered when the content in the rendered page is requesting a permission to protected resources.
The variables UserInitiated, PermissionKind and Uri are read-only.
UserInitiated is set to true when the permission was requested on behalf of a user action such as clicking on a hyperlink.
PermissionKind tell you the type of resource that is requested.
The Uri returns the URL of the page that requests the permission.
The boolean Handled can be set to True to indicate that your code handled this event.
The boolean SavesInProfile can be set to False to indicate that you do not want to save the state and want to continue receiving this event.
Via State you can notify the WebView2 control if you want to allow or disallow the permission request. You can also fall back to the default setting as determined at application level by an administrator.
More details can be found at the Microsoft .Net interface: CoreWebView2.PermissionRequested.
Introduced in AntView release 1.1.164
Support for the parameters Handled and SavesInProfile was added in AntView release 2.0.459.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024