aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/clients/matchall
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/clients/matchall
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/api/clients/matchall')
-rw-r--r--files/fr/web/api/clients/matchall/index.html130
1 files changed, 130 insertions, 0 deletions
diff --git a/files/fr/web/api/clients/matchall/index.html b/files/fr/web/api/clients/matchall/index.html
new file mode 100644
index 0000000000..6b17e793b9
--- /dev/null
+++ b/files/fr/web/api/clients/matchall/index.html
@@ -0,0 +1,130 @@
+---
+title: Clients.matchAll()
+slug: Web/API/Clients/matchAll
+tags:
+ - API
+ - Client
+ - Expérimental(2)
+ - Méthode
+ - Référence(2)
+ - Service Workers
+translation_of: Web/API/Clients/matchAll
+---
+<div>{{SeeCompatTable}}{{APIRef("Service Workers API")}}</div>
+
+<div>La méthode <strong><code>matchAll()</code></strong> de l'interface {{domxref("Clients")}} retourne une <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" title="The Promise object is used for deferred and asynchronous computations. A Promise is in one of the three states:">Promesse</a></code> pour une liste de service worker clients. Inclure le paramètre <code>options</code> permet de retourner tous les services worker clients dont l'origine est la même que l'origine du service worker associé. Si <code>options</code> n'est pas inclus, la méthode retourne que le service worker client controllé par le service worker.</div>
+
+<div> </div>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<pre class="brush: js">ServiceWorkerClients.matchAll(options).then(function(clients) {
+ // faire quelque chose avec la list de clients
+});</pre>
+
+<h3 id="Paramètres">Paramètres</h3>
+
+<dl>
+ <dt><code>options</code></dt>
+ <dd>L'objet <code>option</code> vous permet de définir les options pour l'opération. Les options disponibles sont :
+ <ul>
+ <li><code>includeUncontrolled</code>: Un {{domxref("Boolean")}} — défini à <code>true</code>, l'opération retournera tous les services worker clients qui sont de la même origine que le service worker courant. Sinon, elle ne retournera que le service worker client controllé par le service worker courant. La valeur par défaut est <code>false</code>.</li>
+ <li><code>type</code>: Défini le type de client que vous voulez observer. Les types disponibles sont <code>window</code>, <code>worker</code>, <code>sharedworker</code>, et <code>all</code>. La valeur par défaut est <code>all</code>.</li>
+ </ul>
+ </dd>
+</dl>
+
+<h3 id="Valeur_de_retour">Valeur de retour</h3>
+
+<dl>
+ <dd>Une  <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" title="The Promise object is used for deferred and asynchronous computations. A Promise is in one of the three states:">Promesse</a></code> qui se résout avec un tableau d'objets {{domxref("Client")}}.</dd>
+</dl>
+
+<h2 id="Exemples">Exemples</h2>
+
+<pre class="brush: js">clients.matchAll(options).then(function(clientList) {
+ for(var i = 0 ; i &lt; clients.length ; i++) {
+ if(clientList[i].url === 'index.html') {
+ clients.openWindow(clientList[i]);
+ // ou faire quelque chose avec le client
+ }
+ }
+});</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('Service Workers', '#clients', 'Clients')}}</td>
+ <td>{{Spec2('Service Workers')}}</td>
+ <td>Définition initial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonctionnalité</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>{{CompatChrome(40.0)}}<sup>[1]</sup></td>
+ <td>{{ CompatGeckoDesktop("44.0") }}<sup>[2]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonctionnalité</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(40.0)}}<sup>[1]</sup></td>
+ <td>{{ CompatGeckoMobile("44.0") }}</td>
+ <td>{{ CompatVersionUnknown }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(40.0)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<ul>
+ <li><strong>[1]:</strong> L'option <code>includeUncontrolled</code> option n'est pas supportée avant Chrome {{CompatChrome(43.0)}}.</li>
+ <li><strong>[1]:</strong> L'option <code>includeUncontrolled</code> option n'est pas supportée avant Firefox {{CompatGeckoDesktop("45.0")}}.</li>
+</ul>