0.1.3 • Published 3 years ago

@ri7nz/rescript-intersection-observer v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

rescript-intersection-observer

nearly zero-cost bind IntersectionObserver

Installation

Run the following in your favorit console:

> yarn add @ri7nz/rescript-intersection-observer

OR

> npm install --save @ri7nz/rescript-intersection-observer

Then, add @ri7nz/rescript-intersection-observer in your bsconfig.json:

-- "bs-dependencies": [],
++ "bs-dependencies": ["@ri7nz/rescript-intersection-observer"],

Usage

open Intersection

// construct
let observer = ObserverEntry.new(entries => {
  // implement your observe here
})

// observe
observer->Observer.observe(targetDOMElement)
// unobserve
observer->Observer.unobserve(targetDOMElement)

Or you can check this examples.

API

TODO: docs for API

  • Intersection.Observer
  • Intersection.ObserverEntry
0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.0.0-rc.1

3 years ago