will_send_submit_event


Description:

public signal void will_send_submit_event (Value form, Frame source_frame, Frame target_frame)

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 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.

Parameters:

form

the Value to be submitted, which will always correspond to an HTMLFormElement

source_frame

the Frame containing the form to be submitted

target_frame

the Frame containing the form's target, which may be the same as source_frame if no target was specified