script::dom::bindings::reflector

Trait DomGlobalGeneric

Source
pub(crate) trait DomGlobalGeneric<D>: DomObject
where D: DomTypes,
{ // Provided methods fn global_( &self, realm: InRealm<'_>, ) -> Root<Dom<<D as DomTypes>::GlobalScope>> where Self: Sized { ... } fn global(&self) -> Root<Dom<<D as DomTypes>::GlobalScope>> where Self: Sized { ... } }

Provided Methods§

Source

fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::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) -> Root<Dom<<D as DomTypes>::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§

Source§

impl<D, T> DomGlobalGeneric<D> for T
where D: DomTypes, T: DomObject,