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