### Signal

# WebKit2WebExtension WebFormManager::will-send-submit-event

#### Declaration

    void
    will_send_submit_event (
      WebKitWebFormManager* self,
      JSCValue* form,
      WebKitFrame* source_frame,
      WebKitFrame* target_frame,
      gpointer user_data
    )

#### Description [src]

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.

Default handler: | The default handler is called after the handlers added via `g_signal_connect()`.
Available since: | 2.40

#### Parameters

`form` | `JSCValue`
| The `JSCValue` to be submitted, which will always correspond to an HTMLFormElement.
| The data is owned by the caller of the function.
`source_frame` | `WebKitFrame`
| The `WebKitFrame` containing the form to be submitted.
| The data is owned by the caller of the function.
`target_frame` | `WebKitFrame`
| The `WebKitFrame` containing the form’s target, which may be the same as `source_frame` if no target was specified.
| The data is owned by the caller of the function.