aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/workerglobalscope/ononline/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/workerglobalscope/ononline/index.html')
-rw-r--r--files/fr/web/api/workerglobalscope/ononline/index.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/files/fr/web/api/workerglobalscope/ononline/index.html b/files/fr/web/api/workerglobalscope/ononline/index.html
new file mode 100644
index 0000000000..0b8d96433b
--- /dev/null
+++ b/files/fr/web/api/workerglobalscope/ononline/index.html
@@ -0,0 +1,49 @@
+---
+title: WorkerGlobalScope.ononline
+slug: Web/API/WorkerGlobalScope/ononline
+translation_of: Web/API/WorkerGlobalScope/ononline
+---
+<p>{{APIRef("Web Workers API")}}</p>
+
+<p>La propriété <strong><code>ononline</code></strong> de l'interface {{domxref("WorkerGlobalScope")}} représente un {{domxref("EventHandler")}} à appeler lorsque l'événement {{event("online")}} survient et se propage à travers le {{domxref("Worker")}}.</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre>self.ononline = function() { ... };</pre>
+
+<h2 id="Exemple">Exemple</h2>
+
+<p>L'extrait de code suivant montre un gestionnaire <code>ononline</code> placé dans un worker :</p>
+
+<pre class="brush: js">self.ononline = function() {
+ console.log('Your worker is now online');
+}</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-ononline", "WorkerGlobalScope.ononline")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<div class="hidden">
+<p>The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+</div>
+
+<p>{{Compat("api.WorkerGlobalScope.ononline")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<p>L'interface {{domxref("WorkerGlobalScope")}} à laquelle il appartient.</p>