0.2.3 • Published 4 years ago
@ri7nz/rescript-dom v0.2.3
rescript-intersection-observer
nearly zero-cost bind IntersectionObserver
Installation
Run the following in your favorit console:
> yarn add @ri7nz/rescript-domOR
> npm install --save @ri7nz/rescript-domThen, add @ri7nz/rescript-dom in your bsconfig.json:
-- "bs-dependencies": [],
++ "bs-dependencies": ["@ri7nz/rescript-dom"],Usage
open ResDOM
// example boundingClientRect
let boundingClientRect = ...
// access property of boundingClientRect with DOMRect module
boundingClientRect->DOMRect.x
boundingClientRect->DOMRect.width
boundingClientRect->DOMRect.height
boundingClientRect->DOMRect.top
boundingClientRect->DOMRect.right
boundingClientRect->DOMRect.bottom
boundingClientRect->DOMRect.left
boundingClientRect->DOMRect.toJsonOr you can check this examples.
API
(WIP): docs