OnScriptDialogOpening - cWebView2Browser

Sent when the page tries to open a script dialog

Type: Event

Parameters: String sUrl OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND eKind String sMessage String sDefaultText String ByRef sResultText Boolean ByRef bAccept

ParameterDescription
sUrlURL of the page trying to open the script dialog
eKindKind of script dialog being opened
OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT or OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM or
OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT or
OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD
sMessageText to be shown
sDefaultTextDefault value for prompt dialogs
sResultText (ByRef)Set to the result text of a prompt dialog
bAccept (ByRef)Set to True if the confirm dialog result is positive


Syntax
Procedure OnScriptDialogOpening String sUrl OLECOREWEBVIEW2_SCRIPT_DIALOG_KIND eKind String sMessage String sDefaultText String ByRef sResultText Boolean ByRef bAccept

Description

This message is sent when the page tries to open a script dialog.

Usually this is done from JavaScript by calling window.alert, window.confirm or window.prompt.

This message will only be sent if pbAreDefaultScriptDialogsEnabled is set to False.

Implement this message to implement custom script dialogs where the result can be written to sResultText or bAccept.