다음을 통해 공유


CoreWebView2Frame.PermissionRequested Event

Definition

PermissionRequested is raised when content in an iframe or any of its descendant iframes requests permission to access some privileged resources.

public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2PermissionRequestedEventArgs> PermissionRequested;
member this.PermissionRequested : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2PermissionRequestedEventArgs> 
Public Custom Event PermissionRequested As EventHandler(Of CoreWebView2PermissionRequestedEventArgs) 

Event Type

Remarks

This relates to the PermissionRequested event on the CoreWebView2. Both these events will be raised in the case of an iframe requesting permission. The CoreWebView2Frame's event handlers will be invoked before the event handlers on the CoreWebView2. If the Handled property of the PermissionRequestedEventArgs is set to TRUE within the CoreWebView2Frame event handler, then the event will not be raised on the CoreWebView2, and it's event handlers will not be invoked. In the case of nested iframes, the PermissionRequested event will be raised from the top level iframe. If a deferral is not taken on the event args, the subsequent scripts are blocked until the event handler returns. If a deferral is taken, the scripts are blocked until the deferral is completed.

Applies to