Skip to content

Commit 83f91ce

Browse files
author
rob
committed
refactor: move to local module
1 parent 40da4d1 commit 83f91ce

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

src/Webapi/IntersectionObserver/Webapi__IntersectionObserver__IntersectionObserverEntry.res

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Webapi/Webapi__IntersectionObserver.res

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
/**
22
* Spec: https://www.w3.org/TR/intersection-observer/
33
*/
4-
module IntersectionObserverEntry = Webapi__IntersectionObserver__IntersectionObserverEntry
4+
5+
module IntersectionObserverEntry = {
6+
/**
7+
* Spec: https://www.w3.org/TR/intersection-observer/#intersection-observer-entry
8+
*/
9+
10+
type t = Dom.intersectionObserverEntry
11+
12+
/* Properties */
13+
14+
@get external time: t => float = "time"
15+
@get external rootBounds: t => Dom.domRect = "rootBounds"
16+
@get external boundingClientRect: t => Dom.domRect = "boundingClientRect"
17+
@get external intersectionRect: t => Dom.domRect = "intersectionRect"
18+
@get external isIntersecting: t => bool = "isIntersecting"
19+
@get external intersectionRatio: t => float = "intersectionRatio"
20+
@get external target: t => Dom.element = "target"
21+
}
522

623
type t = Dom.intersectionObserver
724

0 commit comments

Comments
 (0)