blob: 5df92f363448d00b91e2983cf5492439e5fd1111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
---
title: WebSocket.onclose
slug: Web/API/WebSocket/onclose
tags:
- API
- Web API
- WebSocket
- Özellik
translation_of: Web/API/WebSocket/onclose
---
<p>{{APIRef("Web Sockets API")}}</p>
<p><code><strong>WebSocket.onclose</strong></code> özelliği bağlantının {{domxref("WebSocket.readyState","readyState")}} özelliği {{domxref("WebSocket.readyState","CLOSED")}} olduğunda çağırılan bir {{domxref("EventHandler")}}'dır. {{domxref("CloseEvent")}} ile birlikte çağırılır.</p>
<h2 id="Sözdizim">Sözdizim</h2>
<pre class="syntaxbox"><em>aWebSocket</em>.onclose = function(event) {
console.log("WebSocket is closed now.");
};</pre>
<h2 id="Değer">Değer</h2>
<p>Bir {{domxref("EventListener")}}.</p>
<h2 id="Belirtimler">Belirtimler</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Belirtim</th>
<th scope="col">Durum</th>
<th scope="col">Yorum</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', '#handler-websocket-onclose', 'WebSocket: onclose')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>İlk tanım</td>
</tr>
</tbody>
</table>
|