addIntersectionObserver method
bool
addIntersectionObserver(
- IntersectionObserver observer,
- List<double> thresholds
)
Implementation
bool addIntersectionObserver(IntersectionObserver observer, List<double> thresholds) {
if (_intersectionObserverList.contains(observer)) {
return false;
}
if (enableWebFCommandLog) {
domLogger.fine('[IntersectionObserver] attach target=$pointer observer=${observer.pointer} thresholds=$thresholds');
}
renderStyle.addIntersectionChangeListener(_handleIntersectionObserver, thresholds);
_intersectionObserverList.add(observer);
_thresholds = thresholds;
return true;
}