@lawlietff/exposure
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

lawlietff exposure

NPM version

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

License

Readme

Keywords

Package Sidebar

Install

npm i @lawlietff/exposure

Weekly Downloads

0

Version

0.3.2

License

MIT

Unpacked Size

5.68 kB

Total Files

6

Last publish

Collaborators

  • lawlietff