WorkerGlobalScope.onerror
La propriété onerror
de l'interface WorkerGlobalScope
représente un gestionnaire d'évènement à appeler lorsque l'événement error
survient et se propage à travers le Worker
.
Syntaxe
js
self.onerror = function() { ... };
Exemple
L'extrait de code suivant montre un gestionnaire onerror
placé au sein d'un worker :
js
self.onerror = function () {
console.log("There is an error inside your worker!");
};
Spécifications
Specification |
---|
HTML # handler-workerglobalscope-onerror |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.