这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
WorkerNavigator.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.
connectionInfo = self.navigator.connection
| 规范 | 状态 | 注释 |
|---|---|---|
|
网络信息 API
The definition of 'Navigator.connection' in that specification. |
草案 | Initial specification |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
connection
|
Chrome 61 | Edge ≤79 | Firefox No | IE No | Opera Yes | Safari No | WebView Android 50 | Chrome Android 38 | Firefox Android 53 | Opera Android 37 | Safari iOS No | Samsung Internet Android 3.0 |
完整支持
不支持
实验。期望将来行为有所改变。
WorkerNavigator