NavigatorOnLine接口包含了与浏览器网络连接状态相关的方法和属性。
不存在NavigatorOnLine类型的对象,但是存在其他的接口,比如 Navigator 或者 WorkerNavigator,可以实现它。
属性
NavigatorOnLine 接口并不能继承任何属性。
NavigatorOnLine.onLine只读- 返回一个
Boolean值指示浏览器是否为在线状态。
方法
NavigatorOnLine 接口既不能实现,也不能继承任何方法。
规范
| 规范 | 状态 | 注解 |
|---|---|---|
| HTML Living Standard NavigatorOnLine |
Living Standard | 对比最近的简况没有变化, HTML5 |
| HTML5 NavigatorOnLine |
Recommendation | HTML Living Standard 原始标准的简况. |
浏览器兼容性
| 特征 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本支持 | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
在WorkerNavigator |
? | 29 (29) | ? | ? | ? |
| 特征 | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| 基本支持 | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
WorkerNavigator |
? | 29.0 (29) | ? | ? | ? | ? |
浏览相关
- 可以实现它的
Navigator接口。