UNPKG

943 BTypeScriptView Raw
1import Taro from '@tarojs/api';
2type TElement = Document | HTMLElement | Element;
3declare class TaroH5IntersectionObserver implements Taro.IntersectionObserver {
4 private _component;
5 private _options;
6 private _observerInst;
7 private _listeners;
8 private _root;
9 private _rootMargin;
10 private _isInited;
11 protected get container(): TElement;
12 constructor(component: TaroGeneral.IAnyObject, options?: Taro.createIntersectionObserver.Option);
13 private createInst;
14 disconnect(): void;
15 observe(targetSelector: string, callback: Taro.IntersectionObserver.ObserveCallback): void;
16 relativeTo(selector: string, margins?: Taro.IntersectionObserver.RelativeToMargins | undefined): Taro.IntersectionObserver;
17 relativeToViewport(margins?: Taro.IntersectionObserver.RelativeToViewportMargins | undefined): Taro.IntersectionObserver;
18 private _getCallbackByElement;
19}
20export { TaroH5IntersectionObserver };