WebKit2.WebView::script-dialog

connect('script-dialog', function (webView, dialog: WebKit2.ScriptDialog, ): Boolean);
  

Emitted when JavaScript code calls <function>window.alert</function>, <function>window.confirm</function> or <function>window.prompt</function>. The dialog parameter should be used to build the dialog. If the signal is not handled a different dialog will be built and shown depending on the dialog type: <itemizedlist> <listitem><para> WebKit2.ScriptDialogType.alert: message dialog with a single Close button. </para></listitem> <listitem><para> WebKit2.ScriptDialogType.confirm: message dialog with OK and Cancel buttons. </para></listitem> <listitem><para> WebKit2.ScriptDialogType.prompt: message dialog with OK and Cancel buttons and a text entry with the default text. </para></listitem> </itemizedlist>

webView

instance of WebKit2.WebView that is emitting the signal

dialog

the WebKit2.ScriptDialog to show

Returns

true to stop other handlers from being invoked for the event. false to propagate the event further.