Skip to content

Commit 1e4b639

Browse files
committed
Translated "Connection status"
1 parent 2a93f9c commit 1e4b639

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

5-network/12-server-sent-events/article.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ id: 3
146146
Обратите внимание: `id` указывается после текста сообщения, чтобы обновление `lastEventId` произошло после того, как данные сообщения были получены.
147147
```
148148
149-
## Connection status: readyState
149+
## Статус подключения: readyState
150150
151-
The `EventSource` object has `readyState` property, that has one of three values:
151+
У объект `EventSource` есть свойство `readyState`, устанавливаемое в одно из трех значений:
152152
153153
```js no-beautify
154-
EventSource.CONNECTING = 0; // connecting or reconnecting
155-
EventSource.OPEN = 1; // connected
156-
EventSource.CLOSED = 2; // connection closed
154+
EventSource.CONNECTING = 0; // подключение или переподключение
155+
EventSource.OPEN = 1; // подключено
156+
EventSource.CLOSED = 2; // подключение закрыто
157157
```
158158

159-
When an object is created, or the connection is down, it's always `EventSource.CONNECTING` (equals `0`).
159+
При создании объекта и разрыве соединения, оно автоматически устанавливается в значение `EventSource.CONNECTING` (равно `0`).
160160

161-
We can query this property to know the state of `EventSource`.
161+
Мы можем обратится к этому свойству, чтобы узнать текущее состояние `EventSource`.
162162

163163
## Типы событий
164164

0 commit comments

Comments
 (0)