Partager via


CoreWebView2Settings.AreDefaultScriptDialogsEnabled Property

Definition

Determines whether WebView renders the default JavaScript dialog box.

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

Property Value

Remarks

This is used when loading a new HTML document. If set to false, WebView does not render the default JavaScript dialog box (specifically those displayed by the JavaScript alert, confirm, prompt functions and beforeunload event). Instead, WebView raises ScriptDialogOpening event that contains all of the information for the dialog and allow the host app to show a custom UI. The default value is true.

Applies to

See also