WebView.PermissionRequested Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when an action in a IWebView requires that permission be granted.
public event EventHandler<Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlPermissionRequestedEventArgs> PermissionRequested;
member this.PermissionRequested : EventHandler<Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlPermissionRequestedEventArgs>
Public Event PermissionRequested As EventHandler(Of WebViewControlPermissionRequestedEventArgs)
Event Type
Implements
Remarks
The types of permission that can be requested are defined in the Windows.Web.UI.WebViewControlPermissionType enumeration.
If you don't handle the PermissionRequested event, the IWebView denies permission by default.
When you handle a permission request in IWebView, you get a WebViewControlPermissionRequest object as the value of the PermissionRequest property. You can call Allow to grant the request, Deny to deny the request, or Defer to defer the request until a later time.