3.14 <WebKitScriptDialog>

Structure: <WebKitScriptDialog>

Carries details to be shown in user-facing dialogs.

Procedures

Method: script-dialog:close self
Method: close self

Close self.

When handling a <WebKitScriptDialog> asynchronously (script-dialog:ref was called in web-view:script-dialog callback), this function needs to be called to notify that we are done with the script dialog. The dialog will be closed on destruction if this function hasn’t been called before.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

Method: script-dialog:confirm-set-confirmed self confirmed
Method: confirm-set-confirmed self confirmed

Set whether the user confirmed the dialog.

This method is used for confirm and before-unload-confirm dialogs when web-view:script-dialog signal is emitted to set whether the user confirmed the dialog or not. The default implementation of web-view:script-dialog signal sets #t when the OK or Stay buttons are clicked and #f otherwise. It’s an error to use this method with a <WebKitScriptDialog> that is not of type confirm or before-unload-confirm

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

confirmed

Passed: a boolean.

whether user confirmed the dialog

Method: script-dialog:get-dialog-type self ⇒ %return
Method: get-dialog-type self ⇒ %return

Get the dialog type of a <WebKitScriptDialog>.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

%return

Returned: a <WebKitScriptDialogType>.

the <WebKitScriptDialogType> of self

Method: script-dialog:get-message self ⇒ %return
Method: get-message self ⇒ %return

Get the message of a <WebKitScriptDialog>.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

%return

Returned: a string.

the message of self.

Method: script-dialog:prompt-get-default-text self ⇒ %return
Method: prompt-get-default-text self ⇒ %return

Get the default text of a <WebKitScriptDialog> of type prompt.

It’s an error to use this method with a <WebKitScriptDialog> that is not of type prompt.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

%return

Returned: a string.

the default text of self

Method: script-dialog:prompt-set-text self text
Method: prompt-set-text self text

Set the text entered by the user in the dialog.

This method is used for prompt dialogs when web-view:script-dialog signal is emitted to set the text entered by the user. The default implementation of web-view:script-dialog signal sets the text of the entry form when OK button is clicked, otherwise #f is set. It’s an error to use this method with a <WebKitScriptDialog> that is not of type prompt.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

text

Passed: a string.

the text to set

Method: script-dialog:ref self ⇒ %return
Method: ref self ⇒ %return

Atomically increments the reference count of self by one.

This function is MT-safe and may be called from any thread.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>

%return

Returned: a <WebKitScriptDialog>.

The passed in <WebKitScriptDialog>

Method: script-dialog:unref self
Method: unref self

Atomically decrements the reference count of self by one.

If the reference count drops to 0, all memory allocated by the WebKitScriptdialog is released. This function is MT-safe and may be called from any thread.

self

Passed: a <WebKitScriptDialog>.

a <WebKitScriptDialog>