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§
Sourcefn global_(&self, realm: InRealm<'_>) -> DomRoot<D::GlobalScope>where
Self: Sized,
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
Node
s it’s almost always better to use NodeTraits::owning_global
.
Sourcefn global(&self) -> DomRoot<D::GlobalScope>where
Self: Sized,
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
Node
s it’s almost always better to use NodeTraits::owning_global
.