WebViewPermissionRequest WebViewPermissionRequest WebViewPermissionRequest WebViewPermissionRequest Class


Represents a request for permissions in a WebView.

public : sealed class WebViewPermissionRequest
struct winrt::Windows::UI::Xaml::Controls::WebViewPermissionRequest
public sealed class WebViewPermissionRequest
Public NotInheritable Class WebViewPermissionRequest

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


For more info, see the WebView.PermissionRequested event.

When you handle a permission request in a WebView, you get a WebViewPermissionRequest object as the value of the WebViewPermissionRequestedEventArgs.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. For example, you might defer the request if you need to prompt the user for consent.


Id Id Id Id

Gets the identifier for the permission request.

PermissionType PermissionType PermissionType PermissionType

Gets a value that indicates the type of permission that's requested.

State State State State

Gets the current state of the permission request.

Uri Uri Uri Uri

Gets the Uniform Resource Identifier (URI) of the content where the permission request originated.


Allow() Allow() Allow() Allow()

Grants the requested permission.

Defer() Defer() Defer() Defer()

Defers the permission request to be allowed or denied at a later time.

Deny() Deny() Deny() Deny()

Denies the requested permission.

See also