@ri7nz/rescript-dom
v0.2.3
Published
zero binding web DOM or Web API implementation in ReScript
Downloads
3
Readme
rescript-intersection-observer
nearly zero-cost bind IntersectionObserver
Installation
Run the following in your favorit console:
> yarn add @ri7nz/rescript-dom
OR
> npm install --save @ri7nz/rescript-dom
Then, 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.toJson
Or you can check this examples.
API
(WIP): docs