WebKitWebProcessExtension.ScriptWorld

g GObject.Object GObject.Object WebKitWebProcessExtension.ScriptWorld WebKitWebProcessExtension.ScriptWorld GObject.Object->WebKitWebProcessExtension.ScriptWorld

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_default ()

class

new ()

class

new_with_name (name)

get_name ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

window-object-cleared

Emitted when the JavaScript window object in a WebKitWebProcessExtension.ScriptWorld has been cleared.

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKitWebProcessExtension.ScriptWorld(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKitWebProcessExtension.ScriptWorldClass

classmethod get_default()
Returns:

the default WebKitWebProcessExtension.ScriptWorld

Return type:

WebKitWebProcessExtension.ScriptWorld

Get the default WebKitWebProcessExtension.ScriptWorld. This is the normal script world where all scripts are executed by default. You can get the JavaScript execution context of a WebKitWebProcessExtension.ScriptWorld for a given WebKitWebProcessExtension.Frame with webkit_frame_get_javascript_context_for_script_world().

New in version 2.2.

classmethod new()
Returns:

a new isolated WebKitWebProcessExtension.ScriptWorld

Return type:

WebKitWebProcessExtension.ScriptWorld

Creates a new isolated WebKitWebProcessExtension.ScriptWorld. Scripts executed in isolated worlds have access to the DOM but not to other variable or functions created by the page. The WebKitWebProcessExtension.ScriptWorld is created with a generated unique name. Use WebKitWebProcessExtension.ScriptWorld.new_with_name() if you want to create it with a custom name. You can get the JavaScript execution context of a WebKitWebProcessExtension.ScriptWorld for a given WebKitWebProcessExtension.Frame with webkit_frame_get_javascript_context_for_script_world().

New in version 2.2.

classmethod new_with_name(name)
Parameters:

name (str) – a name for the script world

Returns:

a new isolated WebKitWebProcessExtension.ScriptWorld

Return type:

WebKitWebProcessExtension.ScriptWorld

Creates a new isolated WebKitWebProcessExtension.ScriptWorld with a name. Scripts executed in isolated worlds have access to the DOM but not to other variable or functions created by the page. You can get the JavaScript execution context of a WebKitWebProcessExtension.ScriptWorld for a given WebKitWebProcessExtension.Frame with webkit_frame_get_javascript_context_for_script_world().

New in version 2.22.

get_name()
Returns:

the name of self

Return type:

str

Get the name of a WebKitWebProcessExtension.ScriptWorld.

New in version 2.22.

Signal Details

WebKitWebProcessExtension.ScriptWorld.signals.window_object_cleared(script_world, page, frame)
Signal Name:

window-object-cleared

Flags:

RUN_LAST

Parameters:

Emitted when the JavaScript window object in a WebKitWebProcessExtension.ScriptWorld has been cleared. This is the preferred place to set custom properties on the window object using the JavaScriptCore API. You can get the window object of frame from the JavaScript execution context of world that is returned by WebKitWebProcessExtension.Frame.get_js_context_for_script_world().

New in version 2.2.