草案
此页面不完整。

IntersectionObserver interface's read-only thresholds property returns the list of intersection thresholds that was specified when the observer was instantiated with IntersectionObserver() . If only one threshold ratio was provided when instanitating the object, this will be an array containing that single value.

阈值 in 交集观测器 API to learn how thresholds work.

句法

var thresholds = IntersectionObserver.thresholds;
					

An array of intersection thresholds, originally specified using the threshold property when instantiating the observer. If only one observer was specified, without being in an array, this value is a one-entry array containing that threshold. Regardless of the order your original threshold array was in, this one is always sorted in numerically increasing order.

若无 threshold option was included when IntersectionObserver() was used to instantiate the observer, the value of thresholds is simply [0] .

Be careful! Although the 选项 object you can specify when creating an IntersectionObserver has a field named threshold , this property is called thresholds . Confusing? Yes. If you accidentally use thresholds as the name of the field in your 选项 thresholds array will wind up being simply [0.0] , which is likely not what you expect. Debugging chaos may ensue.

范例

<<<...>>>

规范

规范 状态 注释
Intersection Observer
The definition of 'IntersectionObserver.thresholds' in that specification.
工作草案 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
thresholds Chrome 51 Edge 15 Firefox 55
55
不支持 53 — 55 Disabled
Disabled ). To change preferences in Firefox, visit
IE No Opera Yes Safari 12.1 WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android ? Safari iOS 12.2 Samsung Internet Android 5.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

用户必须明确启用此特征。

用户必须明确启用此特征。

元数据

  • 最后修改: