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 --- .../getnotifications/index.html | 72 ---------------------- .../getnotifications/index.md | 72 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 files/fr/web/api/serviceworkerregistration/getnotifications/index.html create mode 100644 files/fr/web/api/serviceworkerregistration/getnotifications/index.md (limited to 'files/fr/web/api/serviceworkerregistration/getnotifications') diff --git a/files/fr/web/api/serviceworkerregistration/getnotifications/index.html b/files/fr/web/api/serviceworkerregistration/getnotifications/index.html deleted file mode 100644 index 23379e7520..0000000000 --- a/files/fr/web/api/serviceworkerregistration/getnotifications/index.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: ServiceWorkerRegistration.getNotifications() -slug: Web/API/ServiceWorkerRegistration/getNotifications -tags: - - API - - API Service worker - - Expérimentale - - Méthode - - Notifications - - Reference - - Service Workers - - ServiceWorkerRegistration - - getNotifications -translation_of: Web/API/ServiceWorkerRegistration/getNotifications ---- -
{{APIRef("Service Workers API")}}
- -

La méthode getNotifications() de l'interface {{domxref ("ServiceWorkerRegistration")}} renvoie une liste des notifications dans l'ordre dans lequel elles ont été créées à partir de l'origine actuelle via l'enregistrement actuel du service worker. Les origines peuvent avoir de nombreuses inscriptions de service worker actives mais de portée différente. Les notifications créées par un service worker sur la même origine ne seront pas disponibles pour les autres services workers actifs sur la même origine.

- -

Syntaxe

- -
s​erviceWorkerRegistration.getNotifications(options)
-.then(function(notificationsList) { ... })
- -

Paramétres

- -
-
options {{optional_inline}}
-
Un objet contenant des options pour filtrer les notifications renvoyées. Les options disponibles sont: -
    -
  • tag: Un {{domxref ("DOMString")}} représentant un tag de notification. Si spécifié, seules les notifications contenant cette balise seront renvoyées.
  • -
-
-
- -

Valeur de retour

- -

Une {{jsxref ("Promise", "Promesse")}} qui se résout en une liste d'objets {{domxref ("Notification")}}.

- -

Exemple

- -
navigator.serviceWorker.register('sw.js')
-
-const options = { tag: 'user_alerts' }
-
-navigator.serviceWorker.ready.then((registration) => {
-  registration.getNotifications(options).then((notifications) => {
-    // do something with your notifications
-  })
-})
-
- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationÉtatCommentaire
{{SpecName('Web Notifications', '#dom-serviceworkerregistration-getnotifications', 'ServiceWorkerRegistration.getNotifications()')}}{{Spec2('Web Notifications')}}Définition initiale
- -

Compatibilité des navigateurs

- -

{{Compat("api.ServiceWorkerRegistration.getNotifications")}}

diff --git a/files/fr/web/api/serviceworkerregistration/getnotifications/index.md b/files/fr/web/api/serviceworkerregistration/getnotifications/index.md new file mode 100644 index 0000000000..23379e7520 --- /dev/null +++ b/files/fr/web/api/serviceworkerregistration/getnotifications/index.md @@ -0,0 +1,72 @@ +--- +title: ServiceWorkerRegistration.getNotifications() +slug: Web/API/ServiceWorkerRegistration/getNotifications +tags: + - API + - API Service worker + - Expérimentale + - Méthode + - Notifications + - Reference + - Service Workers + - ServiceWorkerRegistration + - getNotifications +translation_of: Web/API/ServiceWorkerRegistration/getNotifications +--- +
{{APIRef("Service Workers API")}}
+ +

La méthode getNotifications() de l'interface {{domxref ("ServiceWorkerRegistration")}} renvoie une liste des notifications dans l'ordre dans lequel elles ont été créées à partir de l'origine actuelle via l'enregistrement actuel du service worker. Les origines peuvent avoir de nombreuses inscriptions de service worker actives mais de portée différente. Les notifications créées par un service worker sur la même origine ne seront pas disponibles pour les autres services workers actifs sur la même origine.

+ +

Syntaxe

+ +
s​erviceWorkerRegistration.getNotifications(options)
+.then(function(notificationsList) { ... })
+ +

Paramétres

+ +
+
options {{optional_inline}}
+
Un objet contenant des options pour filtrer les notifications renvoyées. Les options disponibles sont: +
    +
  • tag: Un {{domxref ("DOMString")}} représentant un tag de notification. Si spécifié, seules les notifications contenant cette balise seront renvoyées.
  • +
+
+
+ +

Valeur de retour

+ +

Une {{jsxref ("Promise", "Promesse")}} qui se résout en une liste d'objets {{domxref ("Notification")}}.

+ +

Exemple

+ +
navigator.serviceWorker.register('sw.js')
+
+const options = { tag: 'user_alerts' }
+
+navigator.serviceWorker.ready.then((registration) => {
+  registration.getNotifications(options).then((notifications) => {
+    // do something with your notifications
+  })
+})
+
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationÉtatCommentaire
{{SpecName('Web Notifications', '#dom-serviceworkerregistration-getnotifications', 'ServiceWorkerRegistration.getNotifications()')}}{{Spec2('Web Notifications')}}Définition initiale
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.ServiceWorkerRegistration.getNotifications")}}

-- cgit v1.2.3-54-g00ecf