WebView.connectScriptDialog

gulong connectScriptDialog(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == webkit.script_dialog.ScriptDialog))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.web_view.WebView))) && Parameters!T.length < 3)

Connect to ScriptDialog signal.

Emitted when JavaScript code calls <function>window.alert</function>, <function>window.confirm</function> or <function>window.prompt</function>, or when <function>onbeforeunload</function> event is fired. 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> </para></listitem> <listitem><para> </para></listitem> <listitem><para> a text entry with the default text. </para></listitem> <listitem><para> </para></listitem> </itemizedlist>

It is possible to handle the script dialog request asynchronously, by simply caling webkit.script_dialog.ScriptDialog.ref_ on the dialog argument and calling webkit.script_dialog.ScriptDialog.close when done. If the last reference is removed on a #WebKitScriptDialog and the dialog has not been closed, webkit.script_dialog.ScriptDialog.close will be called.

Parameters

callbacksignal callback delegate or function to connect bool callback(webkit.script_dialog.ScriptDialog dialog, webkit.web_view.WebView webView) dialog the #WebKitScriptDialog to show (optional) webView the instance the signal is connected to (optional) Returns true to stop other handlers from being invoked for the event. false to propagate the event further.
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID