pub trait ScriptWorldExt: 'static {
    fn name(&self) -> Option<GString>;
    fn connect_window_object_cleared<F: Fn(&Self, &WebPage, &Frame) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all ScriptWorld methods.

Implementors

ScriptWorld

Required Methods

Available on crate feature v2_22 only.

Get the name of a ScriptWorld.

Returns

the name of self

Available on crate feature v2_2 only.

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 FrameExt::js_context_for_script_world().

page

a WebPage

frame

the Frame to which world belongs

Implementors