WorkerGlobalScope.onoffline
La propriété onoffline
de l'interface WorkerGlobalScope
représente un event handler
à appeler lorsque l'événement offline (en-US)
survient et se propage à travers le Worker
.
Syntaxe
self.onoffline = function() { ... };
Exemple
L'extrait de code suivant montre un gestionnaire onoffline
placé dans un worker :
self.onoffline = function() {
console.log('Your worker is now offline');
}
Spécifications
Spécification | Statut | Commentaire |
---|---|---|
HTML Living Standard La définition de 'WorkerGlobalScope.onoffline' dans cette spécification. |
Standard évolutif |
Compatibilité des navigateurs
No compatibility data found for api.WorkerGlobalScope.onoffline
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
Voir aussi
L'interface WorkerGlobalScope
à laquelle il appartient.