pub trait FrameExt: 'static {
    fn id(&self) -> u64;
    fn js_context(&self) -> Option<Context>;
    fn js_context_for_script_world(
        &self,
        world: &impl IsA<ScriptWorld>
    ) -> Option<Context>; fn js_value_for_dom_object(
        &self,
        dom_object: &impl IsA<DOMObject>
    ) -> Option<Value>; fn js_value_for_dom_object_in_script_world(
        &self,
        dom_object: &impl IsA<DOMObject>,
        world: &impl IsA<ScriptWorld>
    ) -> Option<Value>; fn uri(&self) -> Option<GString>; fn is_main_frame(&self) -> bool; }
Available on crate feature v2_26 only.
Expand description

Trait containing all Frame methods.

Implementors

Frame

Required Methods

Gets the process-unique identifier of this Frame. No other frame in the same web process will have the same ID; however, frames in other web processes may.

Returns

the identifier of self

Get the JavaScript execution context of self. Use this function to bridge between the WebKit and JavaScriptCore APIs.

Returns

the javascriptcore::Context for the JavaScript execution context of self.

Get the JavaScript execution context of self for the given ScriptWorld.

world

a ScriptWorld

Returns

the javascriptcore::Context for the JavaScript execution context of self for world.

Get a javascriptcore::Value referencing the given DOM object. The value is created in the JavaScript execution context of self.

dom_object

a DOMObject

Returns

the javascriptcore::Value referencing dom_object.

Get a javascriptcore::Value referencing the given DOM object. The value is created in the JavaScript execution context of self for the given ScriptWorld.

dom_object

a DOMObject

world

a ScriptWorld

Returns

the javascriptcore::Value referencing dom_object

Gets the current active URI of self.

Returns

the current active URI of self or None if nothing has been loaded yet.

Gets whether self is the main frame of a WebPage

Returns

true if self is a main frame or false otherwise

Implementors