@lawlietff/exposure
v0.3.2
Published
handle dom exposure
Downloads
2
Readme
lawlietff exposure
A Function to observe an element
install
npm install @lawlietff/exposure
usage
import { lawffExposure } from '@lawlietff/exposure'
lawffExposure({
ele: dom,
callback: (entry) => {},
})
type
export interface ObserverTarget {
ele?: HTMLElement | HTMLElement[]
callback?: (entry: IntersectionObserverEntry) => void
}
TODOs
- throw error
- peer dependencies
- IntersectionObserver polyfill