Class
WebKit2UserContentManager
Description [src]
class WebKit2.UserContentManager : GObject.Object {
parent: GObject,
priv: WebKitUserContentManagerPrivate*
}
Manages user-defined content which affects web pages.
Using a WebKitUserContentManager
user CSS style sheets can be set to
be injected in the web pages loaded by a WebKitWebView
, by webkit_user_content_manager_add_style_sheet().
To use a WebKitUserContentManager
, it must be created using
webkit_user_content_manager_new(), and then used to construct
a WebKitWebView
. User style sheets can be created with webkit_user_style_sheet_new().
User style sheets can be added and removed at any time, but they will affect the web pages loaded afterwards.
Available since: | 2.6 |
Instance methods
webkit_user_content_manager_add_filter
Adds a WebKitUserContentFilter
to the given WebKitUserContentManager
.
Available since: 2.24
webkit_user_content_manager_add_script
Adds a WebKitUserScript
to the given WebKitUserContentManager
.
Available since: 2.6
webkit_user_content_manager_add_style_sheet
Adds a WebKitUserStyleSheet
to the given WebKitUserContentManager
.
Available since: 2.6
webkit_user_content_manager_register_script_message_handler
Registers a new user script message handler.
Available since: 2.8
webkit_user_content_manager_register_script_message_handler_in_world
Registers a new user script message handler in script world.
Available since: 2.22
webkit_user_content_manager_register_script_message_handler_with_reply
Registers a new user script message handler in script world with name world_name
.
Available since: 2.40
webkit_user_content_manager_remove_all_filters
Removes all content filters from the given WebKitUserContentManager
.
Available since: 2.24
webkit_user_content_manager_remove_all_scripts
Removes all user scripts from the given WebKitUserContentManager
.
Available since: 2.6
webkit_user_content_manager_remove_all_style_sheets
Removes all user style sheets from the given WebKitUserContentManager
.
Available since: 2.6
webkit_user_content_manager_remove_filter
Removes a filter from the given WebKitUserContentManager
.
webkit_user_content_manager_remove_filter_by_id
Removes a filter by the given identifier.
Available since: 2.26
webkit_user_content_manager_remove_script
Removes a WebKitUserScript
from the given WebKitUserContentManager
.
Available since: 2.32
webkit_user_content_manager_remove_style_sheet
Removes a WebKitUserStyleSheet
from the given WebKitUserContentManager
.
Available since: 2.32
webkit_user_content_manager_unregister_script_message_handler
Unregisters a previously registered message handler.
Available since: 2.8
webkit_user_content_manager_unregister_script_message_handler_in_world
Unregisters a previously registered message handler in script world with name world_name
.
Available since: 2.22
Signals
WebKit2.UserContentManager::script-message-received
This signal is emitted when JavaScript in a web view calls
window.webkit.messageHandlers.
, after registering
using
webkit_user_content_manager_register_script_message_handler()
Available since: 2.8
WebKit2.UserContentManager::script-message-with-reply-received
This signal is emitted when JavaScript in a web view calls
window.webkit.messageHandlers.
, after registering
using
webkit_user_content_manager_register_script_message_handler_with_reply()
Available since: 2.40
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct WebKit2UserContentManagerClass {
GObjectClass parent_class;
void (* _webkit_reserved0) (
void
);
void (* _webkit_reserved1) (
void
);
void (* _webkit_reserved2) (
void
);
void (* _webkit_reserved3) (
void
);
}
Class members
parent_class |
|
No description available. | |
_webkit_reserved0 |
|
No description available. | |
_webkit_reserved1 |
|
No description available. | |
_webkit_reserved2 |
|
No description available. | |
_webkit_reserved3 |
|
No description available. |