Skip to main content

OwnerWindow

Trait OwnerWindow 

Source
pub trait OwnerWindow<D>
where D: DomTypes,
{ // Provided method fn owner_window(&self) -> Option<Root<Dom<<D as DomTypes>::Window>>> { ... } }
Expand description

Try to obtain a Window object from a callback target. This Window may be different than the callback’s associated global if the owner has been adopted into a different realm than it was created in. As such, the default implementation should be used for any callback target that cannot be adopted (i.e. is not a descendant of Node).

Provided Methods§

Implementations on Foreign Types§

Source§

impl<D> OwnerWindow<D> for Handle<'_, *mut JSObject>
where D: DomTypes,

Implementors§