pub trait IntersectionObserverMethods<D: DomTypes> {
    // Required methods
    fn GetRoot(&self) -> Option<ElementOrDocument<D>>;
    fn RootMargin(&self) -> DOMString;
    fn ScrollMargin(&self) -> DOMString;
    fn Thresholds(
        &self,
        cx: SafeJSContext,
        _can_gc: CanGc,
        retval: MutableHandleValue<'_>,
    );
    fn Delay(&self) -> i32;
    fn TrackVisibility(&self) -> bool;
    fn Observe(&self, target: &D::Element);
    fn Unobserve(&self, target: &D::Element);
    fn Disconnect(&self);
    fn TakeRecords(&self) -> Vec<DomRoot<D::IntersectionObserverEntry>> ;
    fn Constructor(
        global: &D::Window,
        proto: Option<HandleObject<'_>>,
        can_gc: CanGc,
        callback: Rc<IntersectionObserverCallback<D>>,
        options: &IntersectionObserverInit<D>,
    ) -> Fallible<DomRoot<D::IntersectionObserver>>;
}

Required Methods§

Source

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

Source

fn RootMargin(&self) -> DOMString

Source

fn ScrollMargin(&self) -> DOMString

Source

fn Thresholds( &self, cx: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )

Source

fn Delay(&self) -> i32

Source

fn TrackVisibility(&self) -> bool

Source

fn Observe(&self, target: &D::Element)

Source

fn Unobserve(&self, target: &D::Element)

Source

fn Disconnect(&self)

Source

fn TakeRecords(&self) -> Vec<DomRoot<D::IntersectionObserverEntry>>

Source

fn Constructor( global: &D::Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, callback: Rc<IntersectionObserverCallback<D>>, options: &IntersectionObserverInit<D>, ) -> Fallible<DomRoot<D::IntersectionObserver>>

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§