Class WebFormManager
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.webprocessextension.WebFormManager
- All Implemented Interfaces:
Proxy
Form manager of a
WebKitWebPage in a WebKitScriptWorld- Since:
- 2.40
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWebFormManager.Builder<B extends WebFormManager.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static interfaceFunctional interface declaration of theFormControlsAssociatedCallbackcallback.static classstatic interfaceFunctional interface declaration of theWillSendSubmitEventCallbackcallback.static interfaceFunctional interface declaration of theWillSubmitFormCallbackcallback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new WebFormManager.WebFormManager(MemorySegment address) Create a WebFormManager proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebFormManagerasParent()Returns this instance as if it were its parent type.static WebFormManager.Builder<? extends WebFormManager.Builder> builder()AWebFormManager.Builderobject constructs aWebFormManagerwith the specified properties.voidemitFormControlsAssociated(@Nullable Frame frame, @Nullable Value @Nullable [] elements) Emits the "form-controls-associated" signal.voidemitWillSendSubmitEvent(@Nullable Value form, @Nullable Frame sourceFrame, @Nullable Frame targetFrame) Emits the "will-send-submit-event" signal.voidemitWillSubmitForm(@Nullable Value form, @Nullable Frame sourceFrame, @Nullable Frame targetFrame) Emits the "will-submit-form" signal.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the WebFormManager classstatic voidinputElementAutoFill(Value element, String value) 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.static booleaninputElementIsAutoFilled(Value element) Get whetherelementis an HTML input element that has been filled automatically.static booleaninputElementIsUserEdited(Value element) Get whetherelementis an HTML text input element that has been edited by a user action.Emitted after form elements (or form associated elements) are associated toframe.This is useful to implement form auto filling for web pages where form fields are added dynamically.This signal is emitted when the DOM submit event is about to be fired forform.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 beforeWebKitWebFormManager::will-submit-form signal is emitted.This signal is emitted whenformwill imminently be submitted.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
WebFormManager
Create a WebFormManager proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
WebFormManager
public WebFormManager()Creates a new WebFormManager.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
inputElementAutoFill
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. Ifelementis not an HTML input element this function does nothing.- Parameters:
element- aJSCValuevalue- the text to set- Since:
- 2.40
-
inputElementIsAutoFilled
Get whetherelementis an HTML input element that has been filled automatically.- Parameters:
element- aJSCValue- Returns:
trueifelementis an HTML input element that has been filled automatically, orfalseotherwise- Since:
- 2.40
-
inputElementIsUserEdited
Get whetherelementis an HTML text input element that has been edited by a user action.- Parameters:
element- aJSCValue- Returns:
trueifelementis an HTML text input element that has been edited by a user action, orfalseotherwise- Since:
- 2.40
-
onFormControlsAssociated
public SignalConnection<WebFormManager.FormControlsAssociatedCallback> onFormControlsAssociated(WebFormManager.FormControlsAssociatedCallback handler) Emitted after form elements (or form associated elements) are associated toframe.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
elementsarray carries the list of those elements which have moved.Clients should take a reference to the members of the
elementsarray if it is desired to keep them alive after the signal handler returns.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.40
- See Also:
-
emitFormControlsAssociated
public void emitFormControlsAssociated(@Nullable Frame frame, @Nullable Value @Nullable [] elements) Emits the "form-controls-associated" signal. SeeonFormControlsAssociated(org.webkitgtk.webprocessextension.WebFormManager.FormControlsAssociatedCallback). -
onWillSendSubmitEvent
public SignalConnection<WebFormManager.WillSendSubmitEventCallback> onWillSendSubmitEvent(WebFormManager.WillSendSubmitEventCallback handler) This signal is emitted when the DOM submit event is about to be fired forform.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 beforeWebKitWebFormManager::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:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.40
- See Also:
-
emitWillSendSubmitEvent
public void emitWillSendSubmitEvent(@Nullable Value form, @Nullable Frame sourceFrame, @Nullable Frame targetFrame) Emits the "will-send-submit-event" signal. SeeonWillSendSubmitEvent(org.webkitgtk.webprocessextension.WebFormManager.WillSendSubmitEventCallback). -
onWillSubmitForm
public SignalConnection<WebFormManager.WillSubmitFormCallback> onWillSubmitForm(WebFormManager.WillSubmitFormCallback handler) This signal is emitted whenformwill 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 afterWebKitWebFormManager::will-send-submit-event if that signal is emitted.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.40
- See Also:
-
emitWillSubmitForm
public void emitWillSubmitForm(@Nullable Value form, @Nullable Frame sourceFrame, @Nullable Frame targetFrame) Emits the "will-submit-form" signal. SeeonWillSubmitForm(org.webkitgtk.webprocessextension.WebFormManager.WillSubmitFormCallback). -
builder
AWebFormManager.Builderobject constructs aWebFormManagerwith the specified properties. Use the variousset...()methods to set properties, and finish construction withWebFormManager.Builder.build().- Returns:
- the builder object
-