WebFormManager.connectWillSendSubmitEvent

Connect to WillSendSubmitEvent signal.

This signal is emitted when the DOM submit event is about to be fired for form. JavaScript code may rely on the submit event to detect that the user has clicked on a submit button, and to possibly cancel the form submission before #WebKitWebFormManager::will-submit-form signal is emitted. However, beware that, for historical reasons, the submit event is not emitted at all if the form submission is triggered by JavaScript. For these reasons, this signal may not be used to reliably detect whether a form will be submitted. Instead, use it to detect if a user has clicked on a form's submit button even if JavaScript later cancels the form submission, or to read the values of the form's fields even if JavaScript later clears certain fields before submitting. This may be needed, for example, to implement a robust browser password manager, as some misguided websites may use such techniques to attempt to thwart password managers.

class WebFormManager
ulong
connectWillSendSubmitEvent
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] : javascriptcore.value.Value)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

void callback(javascriptcore.value.Value form, webkitwebprocessextension.frame.Frame sourceFrame, webkitwebprocessextension.frame.Frame targetFrame, webkitwebprocessextension.web_form_manager.WebFormManager webFormManager)

form the #JSCValue to be submitted, which will always correspond to an HTMLFormElement (optional)

sourceFrame the #WebKitFrame containing the form to be submitted (optional)

targetFrame the #WebKitFrame containing the form's target, which may be the same as source_frame if no target was specified (optional)

webFormManager the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID