다음을 통해 공유


CoreWebView2.ScriptDialogOpening Event

Definition

ScriptDialogOpening is raised when a JavaScript dialog (alert, confirm, prompt, or beforeunload) displays for the WebView.

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

Event Type

Remarks

This event only is raised if the AreDefaultScriptDialogsEnabled property is set to false. This event suppresses dialogs or replaces default dialogs with custom dialogs.

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

See also