Skip to content

Commit 7c6939a

Browse files
authored
Merge pull request #701 from thebuilder/fix/align-options-with-dom
fix: align IntersectionObserver options with DOM API
2 parents b6ef3ce + abb4ee8 commit 7c6939a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface RenderProps {
2121

2222
export interface IntersectionOptions extends IntersectionObserverInit {
2323
/** 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.*/
24-
root?: Element | null;
24+
root?: Element | Document | null;
2525
/** Margin around the root. Can have values similar to the CSS margin property, e.g. `10px 20px 30px 40px` (top, right, bottom, left). */
2626
rootMargin?: string;
2727
/** 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. */

0 commit comments

Comments
 (0)