WebKitWebProcessExtension.WebPage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
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 a |
|
This signal is emitted when request is about to be sent to the server. |
|
This signal is emitted when a |
Fields¶
- Inherited:
Class Details¶
- class WebKitWebProcessExtension.WebPage(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A loaded web page.
- get_editor()¶
- Returns:
- Return type:
Gets the
WebKitWebProcessExtension.WebEditor
of aWebKitWebProcessExtension.WebPage
.New in version 2.10.
- get_form_manager(world)¶
- Parameters:
world (
WebKitWebProcessExtension.ScriptWorld
orNone
) – aWebKitWebProcessExtension.ScriptWorld
- Returns:
- Return type:
Get the
WebKitWebProcessExtension.WebFormManager
of self in world.New in version 2.40.
- get_id()¶
- Returns:
the identifier of self
- Return type:
Get the identifier of the
WebKitWebProcessExtension.WebPage
- get_main_frame()¶
- Returns:
the
WebKitWebProcessExtension.Frame
that is the main frame of self- Return type:
Returns the main frame of a
WebKitWebProcessExtension.WebPage
.New in version 2.2.
- get_uri()¶
- Returns:
the current active URI of web_view or
None
if nothing has been loaded yet.- Return type:
Returns the current active URI of self.
You can monitor the active URI by connecting to the notify::uri signal of self.
- send_message_to_view(message, cancellable, callback, *user_data)¶
- Parameters:
message (
WebKitWebProcessExtension.UserMessage
) – aWebKitWebProcessExtension.UserMessage
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
user_data (
object
orNone
) – the data to pass to callback function
Send message to the #WebKitWebView corresponding to self. If message is floating, it’s consumed.
If you don’t expect any reply, or you simply want to ignore it, you can pass
None
as callback. When the operation is finished, callback will be called. You can then callWebKitWebProcessExtension.WebPage.send_message_to_view_finish
() to get the message reply.New in version 2.28.
- send_message_to_view_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a
WebKitWebProcessExtension.UserMessage
with the reply orNone
in case of error.- Return type:
Finish an asynchronous operation started with
WebKitWebProcessExtension.WebPage.send_message_to_view
().New in version 2.28.
Signal Details¶
- Signal Name:
context-menu
- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage
) – The object which received the signalcontext_menu (
WebKitWebProcessExtension.ContextMenu
) – the proposedWebKitWebProcessExtension.ContextMenu
hit_test_result (
WebKitWebProcessExtension.WebHitTestResult
) – aWebKitWebProcessExtension.WebHitTestResult
- Returns:
True
if the proposed context_menu has been modified, orFalse
otherwise.- Return type:
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 the hit_test_result. Otherwise, it’s recommended to use #WebKitWebView::context-menu signal instead.
New in version 2.8.
- WebKitWebProcessExtension.WebPage.signals.document_loaded(web_page)¶
- Signal Name:
document-loaded
- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage
) – The object which received the signal
This signal is emitted when the DOM document of a
WebKitWebProcessExtension.WebPage
has been loaded.You can wait for this signal to get the DOM document
- WebKitWebProcessExtension.WebPage.signals.send_request(web_page, request, redirected_response)¶
- Signal Name:
send-request
- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage
) – The object which received the signalrequest (
WebKitWebProcessExtension.URIRequest
) – aWebKitWebProcessExtension.URIRequest
redirected_response (
WebKitWebProcessExtension.URIResponse
) – aWebKitWebProcessExtension.URIResponse
, orNone
- Returns:
True
to stop other handlers from being invoked for the event.False
to continue emission of the event.- Return type:
This signal is emitted when request is about to be sent to the server. This signal can be used to modify the
WebKitWebProcessExtension.URIRequest
that 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 request argument containing the new request to be sent to the server due to the redirection and the redirected_response parameter containing the response received by the server for the initial request.
Modifications to the
WebKitWebProcessExtension.URIRequest
and its associatedSoup.MessageHeaders
will be taken into account when the request is sent over the network.
- WebKitWebProcessExtension.WebPage.signals.user_message_received(web_page, message)¶
- Signal Name:
user-message-received
- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage
) – The object which received the signalmessage (
WebKitWebProcessExtension.UserMessage
) – theWebKitWebProcessExtension.UserMessage
received
- Returns:
- Return type:
This signal is emitted when a
WebKitWebProcessExtension.UserMessage
is received from the #WebKitWebView corresponding to web_page. You can reply to the message usingWebKitWebProcessExtension.UserMessage.send_reply
().You can handle the user message asynchronously by calling
GObject.Object.ref
() on message and returningTrue
. If the last reference of message is removed and the message has been replied, the operation in the #WebKitWebView will finish with errorWebKitWebProcessExtension.UserMessageError.USER_MESSAGE_UNHANDLED_MESSAGE
.New in version 2.28.
Property Details¶
- WebKitWebProcessExtension.WebPage.props.uri¶
-
The current active URI of the
WebKitWebProcessExtension.WebPage
.