diff options
author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:24 +0200 |
---|---|---|
committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
commit | 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch) | |
tree | 30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/workerglobalscope/ononline | |
parent | c05efa8d7ae464235cf83d7c0956e42dc6974103 (diff) | |
download | translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2 translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip |
convert content to md
Diffstat (limited to 'files/fr/web/api/workerglobalscope/ononline')
-rw-r--r-- | files/fr/web/api/workerglobalscope/ononline/index.md | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/files/fr/web/api/workerglobalscope/ononline/index.md b/files/fr/web/api/workerglobalscope/ononline/index.md index 69d45c24e4..370f365861 100644 --- a/files/fr/web/api/workerglobalscope/ononline/index.md +++ b/files/fr/web/api/workerglobalscope/ononline/index.md @@ -3,43 +3,34 @@ title: WorkerGlobalScope.ononline slug: Web/API/WorkerGlobalScope/ononline translation_of: Web/API/WorkerGlobalScope/ononline --- -<p>{{APIRef("Web Workers API")}}</p> +{{APIRef("Web Workers API")}} -<p>La propriété <strong><code>ononline</code></strong> de l'interface {{domxref("WorkerGlobalScope")}} représente un {{event("Event_handlers", "event handler")}} à appeler lorsque l'événement {{event("online")}} survient et se propage à travers le {{domxref("Worker")}}.</p> +La propriété **`ononline`** de l'interface {{domxref("WorkerGlobalScope")}} représente un {{event("Event_handlers", "event handler")}} à appeler lorsque l'événement {{event("online")}} survient et se propage à travers le {{domxref("Worker")}}. -<h2 id="Syntaxe">Syntaxe</h2> +## Syntaxe -<pre>self.ononline = function() { ... };</pre> + self.ononline = function() { ... }; -<h2 id="Exemple">Exemple</h2> +## Exemple -<p>L'extrait de code suivant montre un gestionnaire <code>ononline</code> placé dans un worker :</p> +L'extrait de code suivant montre un gestionnaire `ononline` placé dans un worker : -<pre class="brush: js">self.ononline = function() { +```js +self.ononline = function() { console.log('Your worker is now online'); -}</pre> +} +``` -<h2 id="Spécifications">Spécifications</h2> +## Spécifications -<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> +| Spécification | Statut | Commentaire | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- | +| {{SpecName('HTML WHATWG', "#handler-workerglobalscope-ononline", "WorkerGlobalScope.ononline")}} | {{Spec2('HTML WHATWG')}} | | -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> +## Compatibilité des navigateurs -<p>{{Compat("api.WorkerGlobalScope.ononline")}}</p> +{{Compat("api.WorkerGlobalScope.ononline")}} -<h2 id="Voir_aussi">Voir aussi</h2> +## Voir aussi -<p>L'interface {{domxref("WorkerGlobalScope")}} à laquelle il appartient.</p> +L'interface {{domxref("WorkerGlobalScope")}} à laquelle il appartient. |