gi-webkit2webextension-4.0.25: WebKit2-WebExtension bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2WebExtension.Objects.ScriptWorld

Description

No description available in the introspection data.

Synopsis

Exported types

newtype ScriptWorld Source #

Memory-managed wrapper type.

Constructors

ScriptWorld (ManagedPtr ScriptWorld) 

Instances

Instances details
Eq ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

Methods

(==) :: ScriptWorld -> ScriptWorld -> Bool

(/=) :: ScriptWorld -> ScriptWorld -> Bool

GObject ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

ManagedPtrNewtype ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

Methods

toManagedPtr :: ScriptWorld -> ManagedPtr ScriptWorld

TypedObject ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

Methods

glibType :: IO GType

IsGValue ScriptWorld Source #

Convert ScriptWorld to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

Methods

toGValue :: ScriptWorld -> IO GValue

fromGValue :: GValue -> IO ScriptWorld

HasParentTypes ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

type ParentTypes ScriptWorld Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

type ParentTypes ScriptWorld = '[Object]

class (GObject o, IsDescendantOf ScriptWorld o) => IsScriptWorld o Source #

Type class for types which can be safely cast to ScriptWorld, for instance with toScriptWorld.

Instances

Instances details
(GObject o, IsDescendantOf ScriptWorld o) => IsScriptWorld o Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.ScriptWorld

toScriptWorld :: (MonadIO m, IsScriptWorld o) => o -> m ScriptWorld Source #

Cast to ScriptWorld, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getDefault

scriptWorldGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ScriptWorld

Returns: the default ScriptWorld

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

Since: 2.2

getName

scriptWorldGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsScriptWorld a) 
=> a

world: a ScriptWorld

-> m Text

Returns: the name of world

Get the name of a ScriptWorld.

Since: 2.22

new

scriptWorldNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ScriptWorld

Returns: a new isolated ScriptWorld

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

Since: 2.2

newWithName

scriptWorldNewWithName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: a name for the script world

-> m ScriptWorld

Returns: a new isolated ScriptWorld

Creates a new isolated 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 ScriptWorld for a given Frame with webkit_frame_get_javascript_context_for_script_world().

Since: 2.22

Signals

windowObjectCleared

type C_ScriptWorldWindowObjectClearedCallback = Ptr () -> Ptr WebPage -> Ptr Frame -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type ScriptWorldWindowObjectClearedCallback Source #

Arguments

 = WebPage

page: a WebPage

-> Frame

frame: the Frame to which world belongs

-> IO () 

Emitted when the JavaScript window object in a 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 frameGetJsContextForScriptWorld.

Since: 2.2

afterScriptWorldWindowObjectCleared :: (IsScriptWorld a, MonadIO m) => a -> ScriptWorldWindowObjectClearedCallback -> m SignalHandlerId Source #

Connect a signal handler for the windowObjectCleared signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after scriptWorld #windowObjectCleared callback

onScriptWorldWindowObjectCleared :: (IsScriptWorld a, MonadIO m) => a -> ScriptWorldWindowObjectClearedCallback -> m SignalHandlerId Source #

Connect a signal handler for the windowObjectCleared signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on scriptWorld #windowObjectCleared callback