DoubleRange

DoubleRange dictionary is used to define a range of permitted double-precision floating-point values for a property, with either or both a maximum and minimum value specified. The ConstrainDouble dictionary is based on this, augmenting it to support exact and ideal values as well.

特性

max
A floating-point value specifying the largest permissible value of the property it describes.
min
A floating-point value specifying the smallest permissible value of the property it describes.

The specified min and/or and max values are required . If no match can be found that is within the given range, an error will occur.

规范

规范 状态 Comment
媒体捕获和流
The definition of 'DoubleRange' in that specification.
候选推荐 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
DoubleRange Chrome Yes Edge ≤79 Firefox 50 IE 不支持 No Opera 不支持 No Safari ? WebView Android Yes Chrome Android Yes Firefox Android 50 Opera Android 不支持 No Safari iOS ? Samsung Internet Android Yes

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知

另请参阅