gi-webkit2webextension-4.0.16: WebKit2-WebExtension bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2WebExtension.Objects.ScriptWorld

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

class GObject o => IsScriptWorld o Source #

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

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

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 frameGetJavascriptContextForScriptWorld.

Since: 2.2

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. You can get the JavaScript execution context of a ScriptWorld for a given Frame with frameGetJavascriptContextForScriptWorld.

Since: 2.2

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 frameGetJavascriptContextForScriptWorld.

Since: 2.2

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

Connect a signal handler for the “window-object-cleared” 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 “window-object-cleared” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on scriptWorld #windowObjectCleared callback