From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- files/fr/web/api/windowclient/focus/index.html | 73 ----------------- files/fr/web/api/windowclient/focus/index.md | 73 +++++++++++++++++ files/fr/web/api/windowclient/focused/index.html | 61 -------------- files/fr/web/api/windowclient/focused/index.md | 61 ++++++++++++++ files/fr/web/api/windowclient/index.html | 92 ---------------------- files/fr/web/api/windowclient/index.md | 92 ++++++++++++++++++++++ files/fr/web/api/windowclient/navigate/index.html | 55 ------------- files/fr/web/api/windowclient/navigate/index.md | 55 +++++++++++++ .../api/windowclient/visibilitystate/index.html | 55 ------------- .../web/api/windowclient/visibilitystate/index.md | 55 +++++++++++++ 10 files changed, 336 insertions(+), 336 deletions(-) delete mode 100644 files/fr/web/api/windowclient/focus/index.html create mode 100644 files/fr/web/api/windowclient/focus/index.md delete mode 100644 files/fr/web/api/windowclient/focused/index.html create mode 100644 files/fr/web/api/windowclient/focused/index.md delete mode 100644 files/fr/web/api/windowclient/index.html create mode 100644 files/fr/web/api/windowclient/index.md delete mode 100644 files/fr/web/api/windowclient/navigate/index.html create mode 100644 files/fr/web/api/windowclient/navigate/index.md delete mode 100644 files/fr/web/api/windowclient/visibilitystate/index.html create mode 100644 files/fr/web/api/windowclient/visibilitystate/index.md (limited to 'files/fr/web/api/windowclient') diff --git a/files/fr/web/api/windowclient/focus/index.html b/files/fr/web/api/windowclient/focus/index.html deleted file mode 100644 index b78542bb67..0000000000 --- a/files/fr/web/api/windowclient/focus/index.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: WindowClient.focus() -slug: Web/API/WindowClient/focus -tags: - - API - - Client - - Experimental - - Focus - - Method - - Reference - - Service Workers - - WindowClient -translation_of: Web/API/WindowClient/focus ---- -

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

- -

La méthode focus() de l'interface {{domxref("WindowClient")}} focus le client en cours et retourne une {{jsxref("Promise")}} qui est résolue vers le {{domxref("WindowClient")}} existant.

- -

Syntaxe

- -
Client.focus().then(function(WindowClient) {
-  // utilisez le WindowClient une fois qu'il est focus
-});
- -

Paramètres

- -

Nil.

- -

Valeur de retour

- -

Une {{jsxref("Promise")}} qui est résolue vers le {{domxref("WindowClient")}} existant.

- -

Exemple

- -
self.addEventListener('notificationclick', function(event) {
-  console.log('On notification click: ', event.notification.tag);
-  event.notification.close();
-
-  // Vérifie si le client en cours est ouvert et
-  // le focus le cas échéant
-  event.waitUntil(clients.matchAll({
-    type: "window"
-  }).then(function(clientList) {
-    for (var i = 0; i < clientList.length; i++) {
-      var client = clientList[i];
-      if (client.url == '/' && 'focus' in client)
-        return client.focus();
-    }
-    if (clients.openWindow)
-      return clients.openWindow('/');
-  }));
-});
- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('Service Workers', '#client-focus-method', 'focus()')}}{{Spec2('Service Workers')}}Définition initiale..
- -

Compatibilité des navigateurs

- -

{{Compat("api.WindowClient.focus")}}

diff --git a/files/fr/web/api/windowclient/focus/index.md b/files/fr/web/api/windowclient/focus/index.md new file mode 100644 index 0000000000..b78542bb67 --- /dev/null +++ b/files/fr/web/api/windowclient/focus/index.md @@ -0,0 +1,73 @@ +--- +title: WindowClient.focus() +slug: Web/API/WindowClient/focus +tags: + - API + - Client + - Experimental + - Focus + - Method + - Reference + - Service Workers + - WindowClient +translation_of: Web/API/WindowClient/focus +--- +

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

+ +

La méthode focus() de l'interface {{domxref("WindowClient")}} focus le client en cours et retourne une {{jsxref("Promise")}} qui est résolue vers le {{domxref("WindowClient")}} existant.

+ +

Syntaxe

+ +
Client.focus().then(function(WindowClient) {
+  // utilisez le WindowClient une fois qu'il est focus
+});
+ +

Paramètres

+ +

Nil.

+ +

Valeur de retour

+ +

Une {{jsxref("Promise")}} qui est résolue vers le {{domxref("WindowClient")}} existant.

+ +

Exemple

+ +
self.addEventListener('notificationclick', function(event) {
+  console.log('On notification click: ', event.notification.tag);
+  event.notification.close();
+
+  // Vérifie si le client en cours est ouvert et
+  // le focus le cas échéant
+  event.waitUntil(clients.matchAll({
+    type: "window"
+  }).then(function(clientList) {
+    for (var i = 0; i < clientList.length; i++) {
+      var client = clientList[i];
+      if (client.url == '/' && 'focus' in client)
+        return client.focus();
+    }
+    if (clients.openWindow)
+      return clients.openWindow('/');
+  }));
+});
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('Service Workers', '#client-focus-method', 'focus()')}}{{Spec2('Service Workers')}}Définition initiale..
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.WindowClient.focus")}}

diff --git a/files/fr/web/api/windowclient/focused/index.html b/files/fr/web/api/windowclient/focused/index.html deleted file mode 100644 index 4d9c450178..0000000000 --- a/files/fr/web/api/windowclient/focused/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: WindowClient.focused -slug: Web/API/WindowClient/focused -translation_of: Web/API/WindowClient/focused ---- -
{{SeeCompatTable}}{{APIRef("Service Workers API")}}
- -

La propriété focused , en lecture seule de l'interface  {{domxref("WindowClient")}} , est un {{domxref("Boolean")}} qui indique si client actuel a le focus .

- -

Syntax

- -
myFocused = WindowClient.focused;
- -

Value

- -

A {{domxref("Boolean")}}.

- -

Example

- -
self.addEventListener('notificationclick', function(event) {
-  console.log('On notification click: ', event.notification.tag);
-  event.notification.close();
-
-  // This looks to see if the current is already open and
-  // focuses if it is
-  event.waitUntil(clients.matchAll({
-    type: "window"
-  }).then(function(clientList) {
-    for (var i = 0; i < clientList.length; i++) {
-      var client = clientList[i];
-      if (client.url == '/' && 'focus' in client) {
-        if(!client.focused)
-          return client.focus();
-        }
-      }
-    }
-    if (clients.openWindow)
-      return clients.openWindow('/');
-  }));
-});
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Initial definition
- -

Compatibilité des navigateurs

- -

{{Compat("api.WindowClient.focused")}}

diff --git a/files/fr/web/api/windowclient/focused/index.md b/files/fr/web/api/windowclient/focused/index.md new file mode 100644 index 0000000000..4d9c450178 --- /dev/null +++ b/files/fr/web/api/windowclient/focused/index.md @@ -0,0 +1,61 @@ +--- +title: WindowClient.focused +slug: Web/API/WindowClient/focused +translation_of: Web/API/WindowClient/focused +--- +
{{SeeCompatTable}}{{APIRef("Service Workers API")}}
+ +

La propriété focused , en lecture seule de l'interface  {{domxref("WindowClient")}} , est un {{domxref("Boolean")}} qui indique si client actuel a le focus .

+ +

Syntax

+ +
myFocused = WindowClient.focused;
+ +

Value

+ +

A {{domxref("Boolean")}}.

+ +

Example

+ +
self.addEventListener('notificationclick', function(event) {
+  console.log('On notification click: ', event.notification.tag);
+  event.notification.close();
+
+  // This looks to see if the current is already open and
+  // focuses if it is
+  event.waitUntil(clients.matchAll({
+    type: "window"
+  }).then(function(clientList) {
+    for (var i = 0; i < clientList.length; i++) {
+      var client = clientList[i];
+      if (client.url == '/' && 'focus' in client) {
+        if(!client.focused)
+          return client.focus();
+        }
+      }
+    }
+    if (clients.openWindow)
+      return clients.openWindow('/');
+  }));
+});
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Initial definition
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.WindowClient.focused")}}

diff --git a/files/fr/web/api/windowclient/index.html b/files/fr/web/api/windowclient/index.html deleted file mode 100644 index 1a7d646b7a..0000000000 --- a/files/fr/web/api/windowclient/index.html +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: WindowClient -slug: Web/API/WindowClient -tags: - - API - - Client - - Experimental - - Interface - - Reference - - Service Workers - - ServiceWorker - - WindowClient -translation_of: Web/API/WindowClient ---- -

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

- -

L'interface WindowClient de l'API ServiceWorker représente la portée d'un client service worker lorsque celui-ci existe en tant que document dans un contexte navigateur, controlé par un worker actif. Le client sélectionne et utilise un service worker pour son propre chargement et celui de ses sous-ressources.

- -

Méthodes

- -

WindowClient hérite certaines méthodes de son parent, {{domxref("Client")}}.

- -
-
{{domxref("WindowClient.focus()")}}
-
Assigne le focus au client en cours.
-
{{domxref("WindowClient.navigate()")}}
-
Charge l'url spécifiée dans la page en cours.
-
- -

Propriétés

- -

WindowClient hérite certaines propriétés de son parent, {{domxref("Client")}}.

- -
-
{{domxref("WindowClient.focused")}} {{readonlyInline}}
-
Un booléen qui indique si oui ou non le client en cours est focus.
-
{{domxref("WindowClient.visibilityState")}} {{readonlyInline}}
-
Indique la visibilité du client en cours. Peut prendre les valeures hidden, visible, prerender, ou unloaded.
-
- -

Exemple

- -
self.addEventListener('notificationclick', function(event) {
-  console.log('On notification click: ', event.notification.tag);
-  event.notification.close();
-
-  // Vérifie si le client en cours est ouvert et
-  // le focus le cas échéant
-  event.waitUntil(clients.matchAll({
-    type: "window"
-  }).then(function(clientList) {
-    for (var i = 0; i < clientList.length; i++) {
-      var client = clientList[i];
-      if (client.url == '/' && 'focus' in client)
-        return client.focus();
-    }
-    if (clients.openWindow)
-      return clients.openWindow('/');
-  }));
-});
- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("api.WindowClient")}}

- -

Voir aussi

- - diff --git a/files/fr/web/api/windowclient/index.md b/files/fr/web/api/windowclient/index.md new file mode 100644 index 0000000000..1a7d646b7a --- /dev/null +++ b/files/fr/web/api/windowclient/index.md @@ -0,0 +1,92 @@ +--- +title: WindowClient +slug: Web/API/WindowClient +tags: + - API + - Client + - Experimental + - Interface + - Reference + - Service Workers + - ServiceWorker + - WindowClient +translation_of: Web/API/WindowClient +--- +

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

+ +

L'interface WindowClient de l'API ServiceWorker représente la portée d'un client service worker lorsque celui-ci existe en tant que document dans un contexte navigateur, controlé par un worker actif. Le client sélectionne et utilise un service worker pour son propre chargement et celui de ses sous-ressources.

+ +

Méthodes

+ +

WindowClient hérite certaines méthodes de son parent, {{domxref("Client")}}.

+ +
+
{{domxref("WindowClient.focus()")}}
+
Assigne le focus au client en cours.
+
{{domxref("WindowClient.navigate()")}}
+
Charge l'url spécifiée dans la page en cours.
+
+ +

Propriétés

+ +

WindowClient hérite certaines propriétés de son parent, {{domxref("Client")}}.

+ +
+
{{domxref("WindowClient.focused")}} {{readonlyInline}}
+
Un booléen qui indique si oui ou non le client en cours est focus.
+
{{domxref("WindowClient.visibilityState")}} {{readonlyInline}}
+
Indique la visibilité du client en cours. Peut prendre les valeures hidden, visible, prerender, ou unloaded.
+
+ +

Exemple

+ +
self.addEventListener('notificationclick', function(event) {
+  console.log('On notification click: ', event.notification.tag);
+  event.notification.close();
+
+  // Vérifie si le client en cours est ouvert et
+  // le focus le cas échéant
+  event.waitUntil(clients.matchAll({
+    type: "window"
+  }).then(function(clientList) {
+    for (var i = 0; i < clientList.length; i++) {
+      var client = clientList[i];
+      if (client.url == '/' && 'focus' in client)
+        return client.focus();
+    }
+    if (clients.openWindow)
+      return clients.openWindow('/');
+  }));
+});
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.WindowClient")}}

+ +

Voir aussi

+ + diff --git a/files/fr/web/api/windowclient/navigate/index.html b/files/fr/web/api/windowclient/navigate/index.html deleted file mode 100644 index 038f93f87c..0000000000 --- a/files/fr/web/api/windowclient/navigate/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: WindowClient.navigate() -slug: Web/API/WindowClient/navigate -tags: - - API - - Client - - Expérimentale - - Method - - Navigate - - Reference - - Service Workers - - WindowClient -translation_of: Web/API/WindowClient/navigate ---- -

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

- -

La méthode navigate() de l'interface  {{domxref("WindowClient")}} charge une URL spécifiée dans une page de client contrôlée, puis retourne une  {{jsxref("Promise")}}  qui devra être analysée par  {{domxref("WindowClient")}} (le demandeur).

- -

Syntaxe

- -
WindowClient.navigate(url).then(function(WindowClient) {
-  // do something with your WindowClient after navigation
-});
- -

Paramètres

- -
-
url
-
L'emplacement pour naviguer vers (url est une string) .
-
- -

Retour

- -

Une {{jsxref("Promise")}}  qui sera analysée par le demandeur {{domxref("WindowClient")}} (fonctionnement asynchrone : je te promet de faire, mais je suis pas sûr, à toi de vérifier) .

- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('Service Workers', '#client-navigate-method', 'navigate()')}}{{Spec2('Service Workers')}}définition initiale
- -

Compatibilité des navigateurs

- -

{{Compat("api.WindowClient.navigate")}}

diff --git a/files/fr/web/api/windowclient/navigate/index.md b/files/fr/web/api/windowclient/navigate/index.md new file mode 100644 index 0000000000..038f93f87c --- /dev/null +++ b/files/fr/web/api/windowclient/navigate/index.md @@ -0,0 +1,55 @@ +--- +title: WindowClient.navigate() +slug: Web/API/WindowClient/navigate +tags: + - API + - Client + - Expérimentale + - Method + - Navigate + - Reference + - Service Workers + - WindowClient +translation_of: Web/API/WindowClient/navigate +--- +

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

+ +

La méthode navigate() de l'interface  {{domxref("WindowClient")}} charge une URL spécifiée dans une page de client contrôlée, puis retourne une  {{jsxref("Promise")}}  qui devra être analysée par  {{domxref("WindowClient")}} (le demandeur).

+ +

Syntaxe

+ +
WindowClient.navigate(url).then(function(WindowClient) {
+  // do something with your WindowClient after navigation
+});
+ +

Paramètres

+ +
+
url
+
L'emplacement pour naviguer vers (url est une string) .
+
+ +

Retour

+ +

Une {{jsxref("Promise")}}  qui sera analysée par le demandeur {{domxref("WindowClient")}} (fonctionnement asynchrone : je te promet de faire, mais je suis pas sûr, à toi de vérifier) .

+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('Service Workers', '#client-navigate-method', 'navigate()')}}{{Spec2('Service Workers')}}définition initiale
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.WindowClient.navigate")}}

diff --git a/files/fr/web/api/windowclient/visibilitystate/index.html b/files/fr/web/api/windowclient/visibilitystate/index.html deleted file mode 100644 index 3f0d42838e..0000000000 --- a/files/fr/web/api/windowclient/visibilitystate/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: WindowClient.visibilityState -slug: Web/API/WindowClient/visibilityState -translation_of: Web/API/WindowClient/visibilityState ---- -

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

- -

La propriété visibilityState,  en lecture seule de l'interface {{domxref("WindowClient")}} indique la visibilité du client courant. La valeur pourra être :  hidden, visible, prerender, or unloaded.

- -

Syntaxe

- -
myVisState = WindowClient.visibilityState;
- -

Value

- -

une  {{domxref("DOMString")}}.

- -

Example

- -
  event.waitUntil(clients.matchAll({
-    type: "window"
-  }).then(function(clientList) {
-    for (var i = 0; i < clientList.length; i++) {
-      var client = clientList[i];
-      if (client.url == '/' && 'focus' in client) {
-        if(visibilityState === 'hidden')
-          return client.focus();
-        }
-      }
-    }
-    if (clients.openWindow)
-      return clients.openWindow('/');
-  }));
-});
- -

Spécifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Initial definition.
- -

Compatibilité des navigateurs

- -

{{Compat("api.WindowClient.visibilityState")}}

diff --git a/files/fr/web/api/windowclient/visibilitystate/index.md b/files/fr/web/api/windowclient/visibilitystate/index.md new file mode 100644 index 0000000000..3f0d42838e --- /dev/null +++ b/files/fr/web/api/windowclient/visibilitystate/index.md @@ -0,0 +1,55 @@ +--- +title: WindowClient.visibilityState +slug: Web/API/WindowClient/visibilityState +translation_of: Web/API/WindowClient/visibilityState +--- +

{{SeeCompatTable}}{{APIRef("Service Workers API")}}

+ +

La propriété visibilityState,  en lecture seule de l'interface {{domxref("WindowClient")}} indique la visibilité du client courant. La valeur pourra être :  hidden, visible, prerender, or unloaded.

+ +

Syntaxe

+ +
myVisState = WindowClient.visibilityState;
+ +

Value

+ +

une  {{domxref("DOMString")}}.

+ +

Example

+ +
  event.waitUntil(clients.matchAll({
+    type: "window"
+  }).then(function(clientList) {
+    for (var i = 0; i < clientList.length; i++) {
+      var client = clientList[i];
+      if (client.url == '/' && 'focus' in client) {
+        if(visibilityState === 'hidden')
+          return client.focus();
+        }
+      }
+    }
+    if (clients.openWindow)
+      return clients.openWindow('/');
+  }));
+});
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Service Workers', '#window-client-interface', 'WindowClient')}}{{Spec2('Service Workers')}}Initial definition.
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.WindowClient.visibilityState")}}

-- cgit v1.2.3-54-g00ecf