IntersectionObserver constructor

IntersectionObserver({
  1. JsWrapper<JSObject>? root,
  2. String rootMargin = '0px',
  3. String scrollMargin = '0px',
  4. List<double> threshold = const <double>[],
})

Implementation

factory IntersectionObserver({
  JsWrapper? root,
  String rootMargin = '0px',
  String scrollMargin = '0px',
  List<double> threshold = const <double>[],
}) => IntersectionObserver.fromJsObject(
  js.IntersectionObserver(
    _callback.toJS,
    js.IntersectionObserverInit(
      root: root?.jsObject,
      rootMargin: rootMargin,
      scrollMargin: scrollMargin,
      threshold: threshold.toJS,
    ),
  ),
);