script_bindings::reflector

Trait DomGlobalGeneric

Source
pub trait DomGlobalGeneric<D: DomTypes>: DomObject {
    // Provided method
    fn global_(&self, realm: InRealm<'_>) -> DomRoot<D::GlobalScope>
       where Self: Sized { ... }
}

Provided Methods§

Source

fn global_(&self, realm: InRealm<'_>) -> DomRoot<D::GlobalScope>
where Self: Sized,

Returns the [GlobalScope] of the realm that the DomObject was created in. If this object is a Node, this will be different from it’s owning Document if adopted by. For Nodes it’s almost always better to use NodeTraits::owning_global.

Implementors§