Trait script::dom::bindings::codegen::Bindings::IntersectionObserverBinding::IntersectionObserver_Binding::IntersectionObserverMethods
source · pub trait IntersectionObserverMethods {
// Required methods
fn GetRoot(&self) -> Option<ElementOrDocument>;
fn RootMargin(&self) -> DOMString;
fn ScrollMargin(&self) -> DOMString;
fn Thresholds(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
fn Delay(&self) -> i32;
fn TrackVisibility(&self) -> bool;
fn Observe(&self, target: &Element);
fn Unobserve(&self, target: &Element);
fn Disconnect(&self);
fn TakeRecords(&self) -> Vec<Root<Dom<IntersectionObserverEntry>>>;
fn Constructor(
global: &Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
callback: Rc<IntersectionObserverCallback>,
options: &IntersectionObserverInit,
) -> Root<Dom<IntersectionObserver>>;
}
Required Methods§
fn GetRoot(&self) -> Option<ElementOrDocument>
fn RootMargin(&self) -> DOMString
fn ScrollMargin(&self) -> DOMString
fn Thresholds(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)
fn Delay(&self) -> i32
fn TrackVisibility(&self) -> bool
fn Observe(&self, target: &Element)
fn Unobserve(&self, target: &Element)
fn Disconnect(&self)
fn TakeRecords(&self) -> Vec<Root<Dom<IntersectionObserverEntry>>>
fn Constructor( global: &Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, callback: Rc<IntersectionObserverCallback>, options: &IntersectionObserverInit, ) -> Root<Dom<IntersectionObserver>>
Object Safety§
This trait is not object safe.