这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
Navigator.connection
只读特性返回
NetworkInformation
object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
This could be used to select high definition content or low definition content based on the user's connection.
networkInformation = navigator.connection
A
NetworkInformation
对象。
| 规范 | 状态 | 注释 |
|---|---|---|
|
网络信息 API
The definition of 'Navigator.connection' in that specification. |
草案 | Initial specification |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
connection
|
Chrome 61 | Edge ≤79 | Firefox Yes | IE No | Opera Yes | Safari No | WebView Android 50 | Chrome Android 38 |
Firefox Android
14
|
Opera Android 37 | Safari iOS No | Samsung Internet Android 3.0 |
完整支持
不支持
实验。期望将来行为有所改变。
见实现注意事项。
用户必须明确启用此特征。
Navigator
activeVRDisplays
appCodeName
appName
appVersion
battery
buildID
clipboard
connection
cookieEnabled
credentials
deviceMemory
doNotTrack
geolocation
keyboard
语言
languages
locks
maxTouchPoints
mediaDevices
mediaSession
onLine
oscpu
permissions
platform
product
productSub
serviceWorker
userAgent
vendor
vendorSub
webdriver
xr