CoreWebView2Settings.AreDefaultScriptDialogsEnabled 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.
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
.