From abb4ee8cbd3d2e661e0ec25870849854f80a2436 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Wed, 4 Sep 2024 22:06:19 +0200 Subject: [PATCH] fix: align IntersectionObserver options with DOM API --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index f65e6cfc..ea562d90 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -21,7 +21,7 @@ interface RenderProps { export interface IntersectionOptions extends IntersectionObserverInit { /** The IntersectionObserver interface's read-only `root` property identifies the Element or Document whose bounds are treated as the bounding box of the viewport for the element which is the observer's target. If the `root` is null, then the bounds of the actual document viewport are used.*/ - root?: Element | null; + root?: Element | Document | null; /** Margin around the root. Can have values similar to the CSS margin property, e.g. `10px 20px 30px 40px` (top, right, bottom, left). */ rootMargin?: string; /** Number between `0` and `1` indicating the percentage that should be visible before triggering. Can also be an `array` of numbers, to create multiple trigger points. */