This page is not complete.
This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
IntersectionObserver interface's read-only
thresholds property returns the list of intersection thresholds that was specified when the observer was instantiated by calling
IntersectionObserver(). If only one threshold was specified, this may be simply a single number rather than an array of numbers.
var thresholds =IntersectionObserver.thresholds;
If only one threshold was specified when the obsever was created,
thresholds returns that threshold as a number. If an array of threshold values was provided when the object was instantiated, then this value is an array containing all of those thresholds. The array is sorted in numerically increasing order.
threshold option was included when
IntersectionObserver() was used to instantiate the observer, the value of
thresholds is simply
Be careful! While the
options you specify when creating an
IntersectionObserver has a field named
threshold, but this property is called
thresholds. Confusing? Yes. If you accidentally use
thresholds as the name of the field in your options, the
thresholds array will wind up being simply
[0.0], which is likely not what you expect. Debugging chaos may ensue.
The definition of 'IntersectionObserver.thresholds' in that specification.
|Editor's Draft||Initial definition|
|Feature||Chrome||Edge||Firefox (Gecko)||Internet Explorer||Opera||Safari (WebKit)|
|Basic support||51.0||(Yes)||55 (55)||No support||?||?|
|Feature||Android||Android Webview||Edge||Firefox Mobile (Gecko)||Firefox OS||IE Mobile||Opera Mobile||Safari Mobile||Chrome for Android|
|Basic support||No support||51.0||(Yes)||55.0 (55)||No support||No support||?||?||51.0|
 This feature has been implemented since Gecko 53.0 (Firefox 53.0 / Thunderbird 53.0 / SeaMonkey 2.50) behind the preference
dom.IntersectionObserver.enabled, which was
false by default. Enabled by default beginning in Firefox 55. See bug 1243846.