CWebView2.AreDefaultScriptDialogsEnabledproperty
Determines whether WebView renders the default JavaScript dialog box.
Syntax
PROPERTY AreDefaultScriptDialogsEnabled () AS BOOLEAN
PROPERTY AreDefaultScriptDialogsEnabled (BYVAL enabled AS BOOLEAN) AS HRESULT
Description
Used when loading a new HTML document.
Remarks
If set to FALSE, WebView2 does not render the default JavaScript dialog box (specifically those displayed by the JavaScript alert, confirm, prompt functions and beforeunload event). Instead, if an event handler is set using AddScriptDialogOpening, WebView sends an 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.
Reference
- Defined in AfxNova/CWebView2.inc:1035
- Documented in WebView/CWebWiew2 Class.md
- Topic: CWebView2 Class