Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/api/intersection_observer_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The `options` object passed into the {{domxref("IntersectionObserver.Intersectio
The margins are applied to nested scrollable containers before computing intersections.
Positive values grow the clipping rectangle of the container, allowing targets to intersect before they becomes visible, while negative values shrink the clipping rectangle.
- `threshold`
- : Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array \[0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning as soon as even one pixel is visible, the callback will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible.
- : Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array \[0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning the callback will be run as soon as the target element intersects or touches the boundary of the root, even if no pixels are yet visible). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible.
- `delay` {{experimental_inline}}
- : When tracking target visibility ([trackVisibility](#trackvisibility) is `true`), this can be used to set the minimum delay in milliseconds between notifications from this observer.
Limiting the notification rate is desirable because the visibility calculation is computationally intensive.
Expand Down