Language

CoreWebView2PermissionRequestedEventArgs.Handled Property

Definition

The host may set this flag to true to prevent the PermissionRequested event from firing on the CoreWebView2 as well.

public bool Handled { get; set; }
member this.Handled : bool with get, set
Public Property Handled As Boolean

Property Value

Remarks

By default, both the PermissionRequested event on the CoreWebView2Frame and the PermissionRequested event on the CoreWebView2 will be fired, with the CoreWebView2Frame event handlers invoked first. The host may set this flag to true within the PermissionRequested event handlers to prevent the remaining PermissionRequested event handlers from being invoked.

If a deferral is taken on the event args, then you must synchronously set Handled to true prior to taking your deferral to prevent the CoreWebView2's event handlers from being invoked.

Applies to