Signal
WebKit2WebView::script-dialog
Declaration
gboolean
script_dialog (
WebKitWebView* self,
WebKitScriptDialog* dialog,
gpointer user_data
)
Description [src]
Emitted when JavaScript code calls 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:
WEBKIT_SCRIPT_DIALOG_ALERT: message dialog with a single Close button.
WEBKIT_SCRIPT_DIALOG_CONFIRM: message dialog with OK and Cancel buttons.
WEBKIT_SCRIPT_DIALOG_PROMPT: message dialog with OK and Cancel buttons and
a text entry with the default text.
WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM: message dialog with Stay and Leave buttons.
It is possible to handle the script dialog request asynchronously, by simply
caling webkit_script_dialog_ref() on the dialog argument and calling
webkit_script_dialog_close() when done.
If the last reference is removed on a WebKitScriptDialog and the dialog has not been
closed, webkit_script_dialog_close() will be called.
| Default handler: | The default handler is called after the handlers added via |
Parameters
dialog |
WebKitScriptDialog |
The |
|
| The data is owned by the caller of the function. |