WorkerGlobalScope.onoffline
La propriété onoffline
de l'interface WorkerGlobalScope
représente un gestionnaire d'évènement à appeler lorsque l'événement offline
survient et se propage à travers le Worker
.
Syntaxe
js
self.onoffline = function() { ... };
Exemple
L'extrait de code suivant montre un gestionnaire onoffline
placé dans un worker :
js
self.onoffline = function () {
console.log("Your worker is now offline");
};
Spécifications
Specification |
---|
HTML # handler-workerglobalscope-onoffline |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
offline event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Voir aussi
L'interface WorkerGlobalScope
à laquelle il appartient.