aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/websocket/onclose/index.html
diff options
context:
space:
mode:
authorSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-17 23:39:32 +0200
committerGitHub <noreply@github.com>2021-09-17 23:39:32 +0200
commit9a7bf38a2e1551841b9fe1721e232defb3a1177a (patch)
tree26b4f29dd7a489d33992fde43a374f5c63e2bfde /files/fr/web/api/websocket/onclose/index.html
parent1678f2da63025db33c8ec8dc41c5295a94d4c555 (diff)
downloadtranslated-content-9a7bf38a2e1551841b9fe1721e232defb3a1177a.tar.gz
translated-content-9a7bf38a2e1551841b9fe1721e232defb3a1177a.tar.bz2
translated-content-9a7bf38a2e1551841b9fe1721e232defb3a1177a.zip
Revamps WS landing page - translates WS interface subpages - fixes #2139 (#2271)
* Revamps WS landing page - translates WS interface subpages - fixes #2139 * Ajout espace insécable Co-authored-by: Jb Audras <audrasjb@gmail.com>
Diffstat (limited to 'files/fr/web/api/websocket/onclose/index.html')
-rw-r--r--files/fr/web/api/websocket/onclose/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/fr/web/api/websocket/onclose/index.html b/files/fr/web/api/websocket/onclose/index.html
new file mode 100644
index 0000000000..040f03c485
--- /dev/null
+++ b/files/fr/web/api/websocket/onclose/index.html
@@ -0,0 +1,27 @@
+---
+title: WebSocket.onclose
+slug: Web/API/WebSocket/onclose
+browser-compat: api.WebSocket.onclose
+---
+<p>{{APIRef("Web Sockets API")}}</p>
+
+<p>La propriété <code><strong>WebSocket.onclose</strong></code> est un <a href="/fr/docs/Web/Events/Event_handlers">gestionnaire d'évènement</a> invoqué lorsque l'état <a href="/fr/docs/Web/API/WebSocket/readyState"><code>readyState</code></a> de la connexion WebSocket change de valeur pour passer à <a href="/fr/docs/Web/API/WebSocket/readyState"><code>CLOSED</code></a>. Ce gestionnaire est appelé avec un paramètre <a href="/fr/docs/Web/API/CloseEvent"><code>CloseEvent</code></a>.</p>
+
+<h2 id="syntax">Syntaxe</h2>
+
+<pre class="brush: js">
+unWebSocket.onclose = function(event) {
+ console.log("La WebSocket est désormais fermée.");
+};</pre>
+
+<h2 id="value">Valeur</h2>
+
+<p>Une fonction <a href="/fr/docs/Web/API/EventListener"><code>EventListener</code></a>.</p>
+
+<h2 id="specifications">Spécifications</h2>
+
+<p>{{Specifications}}</p>
+
+<h2 id="browser_compatibility">Compatibilité des navigateurs</h2>
+
+<p>{{Compat}}</p>