WebKitWebProcessExtension.WebFormManager

g GObject.Object GObject.Object WebKitWebProcessExtension.WebFormManager WebKitWebProcessExtension.WebFormManager GObject.Object->WebKitWebProcessExtension.WebFormManager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

input_element_auto_fill (element, value)

class

input_element_is_auto_filled (element)

class

input_element_is_user_edited (element)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

form-controls-associated

Emitted after form elements (or form associated elements) are associated to frame.

will-send-submit-event

This signal is emitted when the DOM submit event is about to be fired for form.

will-submit-form

This signal is emitted when form will imminently be submitted.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class WebKitWebProcessExtension.WebFormManager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKitWebProcessExtension.WebFormManagerClass

Form manager of a WebKitWebProcessExtension.WebPage in a WebKitWebProcessExtension.ScriptWorld

New in version 2.40.

classmethod input_element_auto_fill(element, value)
Parameters:

Set the value of an HTML input element as if it had been edited by the user, triggering a change event, and set it as filled automatically. If element is not an HTML input element this function does nothing.

New in version 2.40.

classmethod input_element_is_auto_filled(element)
Parameters:

element (JavaScriptCore.Value) – a JavaScriptCore.Value

Returns:

True if element is an HTML input element that has been filled automatically, or False otherwise

Return type:

bool

Get whether element is an HTML input element that has been filled automatically.

New in version 2.40.

classmethod input_element_is_user_edited(element)
Parameters:

element (JavaScriptCore.Value) – a JavaScriptCore.Value

Returns:

True if element is an HTML text input element that has been edited by a user action, or False otherwise

Return type:

bool

Get whether element is an HTML text input element that has been edited by a user action.

New in version 2.40.

Signal Details

WebKitWebProcessExtension.WebFormManager.signals.form_controls_associated(web_form_manager, frame, elements)
Signal Name:

form-controls-associated

Flags:

RUN_LAST

Parameters:

Emitted after form elements (or form associated elements) are associated to frame. This is useful to implement form auto filling for web pages where form fields are added dynamically. This signal might be emitted multiple times for the same frame.

Note that this signal could be also emitted when form controls are moved between forms. In that case, the elements array carries the list of those elements which have moved.

Clients should take a reference to the members of the elements array if it is desired to keep them alive after the signal handler returns.

New in version 2.40.

WebKitWebProcessExtension.WebFormManager.signals.will_send_submit_event(web_form_manager, form, source_frame, target_frame)
Signal Name:

will-send-submit-event

Flags:

RUN_LAST

Parameters:

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 WebKitWebProcessExtension.WebFormManager ::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.

New in version 2.40.

WebKitWebProcessExtension.WebFormManager.signals.will_submit_form(web_form_manager, form, source_frame, target_frame)
Signal Name:

will-submit-form

Flags:

RUN_LAST

Parameters:

This signal is emitted when form will imminently be submitted. It can no longer be cancelled. This event always occurs immediately before a form is submitted to its target, so use this event to reliably detect when a form is submitted. This signal is emitted after WebKitWebProcessExtension.WebFormManager ::will-send-submit-event if that signal is emitted.

New in version 2.40.