ScriptDialog


Object Hierarchy:

Object hierarchy for ScriptDialog

Description:

public class ScriptDialog : Object

WebKitGTK-shaped — one page alert, confirm, prompt, or before-unload.

Valid for the duration of WebView.script_dialog. Set confirm or prompt text before the handler returns true.

Usage Examples

Answer confirm and prompt

web.script_dialog.connect((dialog) => {
switch (dialog.get_dialog_type()) {
case ScriptDialogType.CONFIRM:
case ScriptDialogType.BEFORE_UNLOAD_CONFIRM:
dialog.confirm_set_confirmed(true);
break;
case ScriptDialogType.PROMPT:
dialog.prompt_set_text(dialog.prompt_get_default_text());
break;
default:
break;
}
return true;
});


Namespace: WebView2Gtk
Package: webview2gtk

Content:

Methods:

Inherited Members:

All known members inherited from class GLib.Object