pub(crate) trait DomGlobalGeneric<D>: DomObjectwhere
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§
Sourcefn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
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
Node
s it’s almost always better to use NodeTraits::owning_global
.
Sourcefn global(&self) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
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
Node
s it’s almost always better to use NodeTraits::owning_global
.