Skip to content

Commit 310d7df

Browse files
author
罗坤
committed
Update README.md
1 parent 42378f5 commit 310d7df

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,19 @@ var socket = new ReconnectingWebSocket(url, null, {reconnectInterval: 3000});
7272
- Accepts `integer` or `null`.
7373
- Default: `null`
7474

75+
### own options
76+
77+
#### `unrecognized`
78+
- Preserve deprecated backwards compatibility for the `origin` option
79+
80+
#### `headers`
81+
- Specifying `origin` as a WebSocket connection option is deprecated. Include it under `headers` instead
82+
- Accepts `origin` and `Cookie`
83+
- Example:
84+
```javascript
85+
WebSocket(url, '', {Cookie: 'key=value'});
86+
```
87+
7588
---
7689

7790
## Methods

0 commit comments

Comments
 (0)