From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/workerglobalscope/ononline/index.html | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 files/fr/web/api/workerglobalscope/ononline/index.html (limited to 'files/fr/web/api/workerglobalscope/ononline') 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 +--- +

{{APIRef("Web Workers API")}}

+ +

La propriété ononline 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")}}.

+ +

Syntaxe

+ +
self.ononline = function() { ... };
+ +

Exemple

+ +

L'extrait de code suivant montre un gestionnaire ononline placé dans un worker :

+ +
self.ononline = function() {
+  console.log('Your worker is now online');
+}
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('HTML WHATWG', "#handler-workerglobalscope-ononline", "WorkerGlobalScope.ononline")}}{{Spec2('HTML WHATWG')}}
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("api.WorkerGlobalScope.ononline")}}

+ +

Voir aussi

+ +

L'interface {{domxref("WorkerGlobalScope")}} à laquelle il appartient.

-- cgit v1.2.3-54-g00ecf