script::dom::bindings::reflector

Trait DomGlobalGeneric

Source
pub(crate) trait DomGlobalGeneric<D: DomTypes>: DomObject {
    // Provided methods
    fn global_(&self, realm: InRealm<'_>) -> DomRoot<D::GlobalScope>
       where Self: Sized { ... }
    fn global(&self) -> 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.

Source

fn global(&self) -> 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§