UNPKG

domtranslator

Version:
12 lines (11 loc) 506 B
import { DOMTranslationScheduler } from './types'; /** * Scheduler for DOM translation that trigger callbacks only for visible nodes. * If node is not visible, callback will be triggered once node will intersect viewport. */ export declare class IntersectionScheduler implements DOMTranslationScheduler { private readonly intersectionObserver; constructor(intersectionConfig?: IntersectionObserverInit); add(node: Node, callback: (node: Node) => void): void; remove(node: Node): void; }