aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/workerglobalscope/onerror
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/workerglobalscope/onerror
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/api/workerglobalscope/onerror')
-rw-r--r--files/fr/web/api/workerglobalscope/onerror/index.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/files/fr/web/api/workerglobalscope/onerror/index.html b/files/fr/web/api/workerglobalscope/onerror/index.html
new file mode 100644
index 0000000000..f2c782a986
--- /dev/null
+++ b/files/fr/web/api/workerglobalscope/onerror/index.html
@@ -0,0 +1,47 @@
+---
+title: WorkerGlobalScope.onerror
+slug: Web/API/WorkerGlobalScope/onerror
+translation_of: Web/API/WorkerGlobalScope/onerror
+---
+<p>{{APIRef("Web Workers API")}}</p>
+
+<p>La propriété <strong><code>onerror</code></strong> de l'interface {{domxref("WorkerGlobalScope")}} représente un {{domxref("EventHandler")}} à appeler lorsque l'événement {{event("error")}} survient et se propage à travers le {{domxref("Worker")}}.</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre>self.onerror = function() { ... };</pre>
+
+<h2 id="Exemple">Exemple</h2>
+
+<p>L'extrait de code suivant montre un gestionnaire <code>onerror</code> placé au sein d'un worker :</p>
+
+<pre class="brush: js">self.onerror = function() {
+ console.log('There is an error inside your worker!');
+}</pre>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "#handler-workerglobalscope-onerror", "WorkerGlobalScope.onerror")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_naviguateurs">Compatibilité des naviguateurs</h2>
+
+
+
+<p>{{Compat("api.WorkerGlobalScope.onerror")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<p>L'interface {{domxref("WorkerGlobalScope")}} à laquelle il appartient.</p>