WebKitWebProcessExtension.WebPage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Emitted when a message is sent to the console. |
|
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.WebEditorof aWebKitWebProcessExtension.WebPage.New in version 2.10.
- get_form_manager(world)¶
- Parameters:
world (
WebKitWebProcessExtension.ScriptWorldorNone) – aWebKitWebProcessExtension.ScriptWorld- Returns:
- Return type:
Get the
WebKitWebProcessExtension.WebFormManagerof 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.Framethat is the main frame of self- Return type:
Returns the main frame of a
WebKitWebProcessExtension.WebPage.New in version 2.2.
Deprecated since version 2.48.
- get_uri()¶
- Returns:
the current active URI of web_view or
Noneif 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.UserMessagecancellable (
Gio.CancellableorNone) – aGio.CancellableorNoneto ignorecallback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNoneuser_data (
objectorNone) – 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
Noneas 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.UserMessagewith the reply orNonein case of error.- Return type:
Finish an asynchronous operation started with
WebKitWebProcessExtension.WebPage.send_message_to_view().New in version 2.28.
Signal Details¶
- WebKitWebProcessExtension.WebPage.signals.console_message_sent(web_page, console_message)¶
- Signal Name:
console-message-sent- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage) – The object which received the signalconsole_message (
WebKitWebProcessExtension.ConsoleMessage) – theWebKitWebProcessExtension.ConsoleMessage
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. The console_message contains information of the message.
New in version 2.12.
- Signal Name:
context-menu- Flags:
- Parameters:
web_page (
WebKitWebProcessExtension.WebPage) – The object which received the signalcontext_menu (
WebKitWebProcessExtension.ContextMenu) – the proposedWebKitWebProcessExtension.ContextMenuhit_test_result (
WebKitWebProcessExtension.WebHitTestResult) – aWebKitWebProcessExtension.WebHitTestResult
- Returns:
Trueif the proposed context_menu has been modified, orFalseotherwise.- 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.WebPagehas 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.URIRequestredirected_response (
WebKitWebProcessExtension.URIResponse) – aWebKitWebProcessExtension.URIResponse, orNone
- Returns:
Trueto stop other handlers from being invoked for the event.Falseto 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.URIRequestthat 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.URIRequestand its associatedSoup.MessageHeaderswill 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.UserMessagereceived
- Returns:
- Return type:
This signal is emitted when a
WebKitWebProcessExtension.UserMessageis 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.