offline

当浏览器失去网络连接时,offline事件被触发。并且navigator.onLine的值变为 false

General info

Specification
HTML5 Offline
Interface
Event
Bubbles
No
Cancelable
No
Target
DefaultView (<window>)
Default Action
None

Properties

Property Type Description
target 只读 EventTarget The event target (the topmost target in the DOM tree).
type 只读 DOMString The type of event.
bubbles 只读 Boolean Whether the event normally bubbles or not
cancelable 只读 Boolean Whether the event is cancellable or not?

文档标签和贡献者