CoreWebView2PermissionRequestedEventArgs.Handled Property
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.
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.