Skip to main content

IntersectionObserverMethods

pub trait IntersectionObserverMethods<D>
where D: DomTypes,
{ // Required methods fn GetRoot(&self) -> Option<ElementOrDocument<D>>; fn RootMargin(&self) -> DOMString; fn ScrollMargin(&self) -> DOMString; fn Thresholds(&self, cx: &mut JSContext, retval: MutableHandle<'_, Value>); fn Delay(&self) -> i32; fn TrackVisibility(&self) -> bool; fn Observe(&self, target: &<D as DomTypes>::Element); fn Unobserve(&self, target: &<D as DomTypes>::Element); fn Disconnect(&self); fn TakeRecords( &self, ) -> Vec<Root<Dom<<D as DomTypes>::IntersectionObserverEntry>>>; fn Constructor( cx: &mut JSContext, global: &<D as DomTypes>::Window, proto: Option<Handle<'_, *mut JSObject>>, callback: Rc<IntersectionObserverCallback<D>>, options: &IntersectionObserverInit<D>, ) -> Result<Root<Dom<<D as DomTypes>::IntersectionObserver>>, Error>; }

Required Methods§

Source

fn GetRoot(&self) -> Option<ElementOrDocument<D>>

Source

fn RootMargin(&self) -> DOMString

Source

fn ScrollMargin(&self) -> DOMString

Source

fn Thresholds(&self, cx: &mut JSContext, retval: MutableHandle<'_, Value>)

Source

fn Delay(&self) -> i32

Source

fn TrackVisibility(&self) -> bool

Source

fn Observe(&self, target: &<D as DomTypes>::Element)

Source

fn Unobserve(&self, target: &<D as DomTypes>::Element)

Source

fn Disconnect(&self)

Source

fn TakeRecords( &self, ) -> Vec<Root<Dom<<D as DomTypes>::IntersectionObserverEntry>>>

Source

fn Constructor( cx: &mut JSContext, global: &<D as DomTypes>::Window, proto: Option<Handle<'_, *mut JSObject>>, callback: Rc<IntersectionObserverCallback<D>>, options: &IntersectionObserverInit<D>, ) -> Result<Root<Dom<<D as DomTypes>::IntersectionObserver>>, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§