WebKitWebProcessExtension.ScriptWorld¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the JavaScript window object in a |
Fields¶
- Inherited:
Class Details¶
- class WebKitWebProcessExtension.ScriptWorld(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_default()¶
- Returns:
the default
WebKitWebProcessExtension.ScriptWorld
- Return type:
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 aWebKitWebProcessExtension.ScriptWorld
for a givenWebKitWebProcessExtension.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:
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. TheWebKitWebProcessExtension.ScriptWorld
is created with a generated unique name. UseWebKitWebProcessExtension.ScriptWorld.new_with_name
() if you want to create it with a custom name. You can get the JavaScript execution context of aWebKitWebProcessExtension.ScriptWorld
for a givenWebKitWebProcessExtension.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:
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 aWebKitWebProcessExtension.ScriptWorld
for a givenWebKitWebProcessExtension.Frame
with webkit_frame_get_javascript_context_for_script_world().New in version 2.22.
- get_name()¶
- Returns:
the name of self
- Return type:
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:
- Parameters:
script_world (
WebKitWebProcessExtension.ScriptWorld
) – The object which received the signalpage (
WebKitWebProcessExtension.WebPage
) – aWebKitWebProcessExtension.WebPage
frame (
WebKitWebProcessExtension.Frame
) – theWebKitWebProcessExtension.Frame
to which world belongs
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 byWebKitWebProcessExtension.Frame.get_js_context_for_script_world
().New in version 2.2.