onoffline
特性为
WorkerGlobalScope
interface represents an
EventHandler
to be called when the
offline
event occurs and bubbles through the
Worker
.
self.onoffline = function() { ... };
The following code snippet shows an
onoffline
handler set inside a worker:
self.onoffline = function() {
console.log('Your worker is now offline');
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'WorkerGlobalScope.onoffline' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onoffline
|
Chrome 4 | Edge ≤79 | Firefox 29 | IE ? | Opera ? | Safari ? | WebView Android Yes | Chrome Android 40 | Firefox Android 29 | Opera Android ? | Safari iOS ? | Samsung Internet Android 4.0 |
完整支持
兼容性未知
WorkerGlobalScope
interface it belongs to.