Class WebPage.Builder<B extends WebPage.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
WebPage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theWebPageobject.Emitted when a message is sent to the console.onContextMenu(WebPage.ContextMenuCallback handler) Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process.This signal is emitted when the DOM document of aWebKitWebPagehas been loaded.onSendRequest(WebPage.SendRequestCallback handler) This signal is emitted whenrequestis about to be sent to the server.This signal is emitted when aWebKitUserMessageis received from theWebKitWebViewcorresponding towebPage.You can reply to the message using webkit_user_message_send_reply().Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theWebPageobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toWebPage.- Overrides:
buildin classGObject.Builder<B extends WebPage.Builder<B>>- Returns:
- a new instance of
WebPagewith the properties that were set in the Builder object.
-
onConsoleMessageSent
Emitted when a message is sent to the console. This can be a message produced by the use of JavaScript console API, a JavaScript exception, a security error or other errors, warnings, debug or log messages. TheconsoleMessagecontains information of the message.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.12
- See Also:
-
onContextMenu
Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process. This signal is useful when the information available in the UI Process is not enough to build or customize the context menu, for example, to add menu entries depending on the node at the coordinates of thehitTestResult.Otherwise, it's recommended to useWebKitWebView::context-menu signal instead.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.8
- See Also:
-
onDocumentLoaded
This signal is emitted when the DOM document of aWebKitWebPagehas been loaded.You can wait for this signal to get the DOM document
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSendRequest
This signal is emitted whenrequestis about to be sent to the server. This signal can be used to modify theWebKitURIRequestthat will be sent to the server. You can also cancel the resource load operation by connecting to this signal and returningtrue.In case of a server redirection this signal is emitted again with the
requestargument containing the new request to be sent to the server due to the redirection and theredirectedResponseparameter containing the response received by the server for the initial request.Modifications to the
WebKitURIRequestand its associatedSoupMessageHeaderswill be taken into account when the request is sent over the network.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onUserMessageReceived
This signal is emitted when aWebKitUserMessageis received from theWebKitWebViewcorresponding towebPage.You can reply to the message using webkit_user_message_send_reply().You can handle the user message asynchronously by calling g_object_ref() on
messageand returningtrue. If the last reference ofmessageis removed and the message has been replied, the operation in theWebKitWebViewwill finish with errorUserMessageError.USER_MESSAGE_UNHANDLED_MESSAGE.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
- See Also:
-