Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype ScriptWorld = ScriptWorld (ManagedPtr ScriptWorld)
- class (GObject o, IsDescendantOf ScriptWorld o) => IsScriptWorld o
- toScriptWorld :: (MonadIO m, IsScriptWorld o) => o -> m ScriptWorld
- scriptWorldGetDefault :: (HasCallStack, MonadIO m) => m ScriptWorld
- scriptWorldGetName :: (HasCallStack, MonadIO m, IsScriptWorld a) => a -> m Text
- scriptWorldNew :: (HasCallStack, MonadIO m) => m ScriptWorld
- scriptWorldNewWithName :: (HasCallStack, MonadIO m) => Text -> m ScriptWorld
- type ScriptWorldWindowObjectClearedCallback = WebPage -> Frame -> IO ()
- afterScriptWorldWindowObjectCleared :: (IsScriptWorld a, MonadIO m) => a -> ((?self :: a) => ScriptWorldWindowObjectClearedCallback) -> m SignalHandlerId
- onScriptWorldWindowObjectCleared :: (IsScriptWorld a, MonadIO m) => a -> ((?self :: a) => ScriptWorldWindowObjectClearedCallback) -> m SignalHandlerId
Exported types
newtype ScriptWorld Source #
Memory-managed wrapper type.
ScriptWorld (ManagedPtr ScriptWorld) |
Instances
Eq ScriptWorld Source # | |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld (==) :: ScriptWorld -> ScriptWorld -> Bool # (/=) :: ScriptWorld -> ScriptWorld -> Bool # | |
GObject ScriptWorld Source # | |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld | |
ManagedPtrNewtype ScriptWorld Source # | |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld toManagedPtr :: ScriptWorld -> ManagedPtr ScriptWorld | |
TypedObject ScriptWorld Source # | |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld | |
HasParentTypes ScriptWorld Source # | |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld | |
IsGValue (Maybe ScriptWorld) Source # | Convert |
Defined in GI.WebKit2WebExtension.Objects.ScriptWorld gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ScriptWorld -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ScriptWorld) | |
type ParentTypes ScriptWorld Source # | |
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
(GObject o, IsDescendantOf ScriptWorld o) => IsScriptWorld o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getName, getProperty, getQdata.
Setters
getDefault
scriptWorldGetDefault Source #
:: (HasCallStack, MonadIO m) | |
=> m ScriptWorld | Returns: the default |
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
:: (HasCallStack, MonadIO m, IsScriptWorld a) | |
=> a |
|
-> m Text | Returns: the name of |
Get the name of a ScriptWorld
.
Since: 2.22
new
:: (HasCallStack, MonadIO m) | |
=> m ScriptWorld | Returns: a new isolated |
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 #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ScriptWorld | Returns: a new isolated |
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 ScriptWorldWindowObjectClearedCallback Source #
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 -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onScriptWorldWindowObjectCleared :: (IsScriptWorld a, MonadIO m) => a -> ((?self :: 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