63 Commits

Author SHA1 Message Date
Michael Cooper
b7db6f792c
Fix comment about trailing slashes 2025-01-23 14:46:47 -08:00
Kevin Jahns
f606f3f9f9 always call close-event even if manually closed + switch to observablev2 2024-12-19 11:10:22 +01:00
Kevin Jahns
d3653d7ea5 force recreation of websocket connection when a ws connection is manually closed 2024-12-19 09:41:39 +01:00
Kevin Jahns
2c3c71e95c add option to specify protocols 2024-07-15 16:20:35 +02:00
Kevin Jahns
d8f1e6b0e1 make params configurable 2024-05-09 19:57:15 +02:00
John Blyberg
b25c89c7c5
Update y-websocket.js 2024-02-20 12:04:52 -05:00
Kevin Jahns
635f39ddd0 do an environment test for nodejs - fixes #166 2024-01-17 11:31:16 +01:00
Kevin Jahns
882ac9eb79 Remove unload event. fixes #165 2024-01-15 12:50:47 +01:00
Kevin Jahns
35be3431b8 upgrade typescript & lint 2023-03-11 10:17:44 +01:00
Kevin Jahns
0b5279fd33 cleanup 2023-03-02 17:08:56 +01:00
Dragoș Străinu
58ae11f52c fix: WebSocket is already in CLOSING or CLOSED state.
Based on https://stackoverflow.com/q/48472977
2022-09-28 15:30:35 +03:00
Kevin Jahns
829a159409 use unload instead of beforeUnload to send disconnect message. closes #119 2022-09-09 16:30:00 +02:00
Kevin Jahns
8e85c7fb16 lint 2022-08-31 22:20:43 +02:00
Kevin Jahns
8c04e0a0c5 fix handling of auth message - fixes #117 2022-08-31 22:13:57 +02:00
Eduard Bardají Puig
1ee18c3766
Export message type constants 2022-08-11 23:32:11 +02:00
lijie
f02ed3474f Improve the judgment condition of WS connection status in resync scenario 2022-06-26 23:50:49 +08:00
Kevin Jahns
3c774953ec add option to disable broadcastchannel - closes #103 2022-04-22 12:44:47 +02:00
war1644
73157ab4b3
Fixed: The memory leak problem that 'websocketprovider' cannot release because 'process' listens to' exit 'events and uses anonymous functions to contain' this' 2022-04-21 17:55:57 +08:00
Kevin Jahns
d6df8ad11f remove usage of lib0/mutex - closes #99 2022-04-17 16:17:27 +02:00
Kevin Jahns
4c4b244c0e implement connection-close & connecton-error event and add parameter for exponential backoff 2022-03-21 13:07:11 +01:00
Kevin Jahns
af5906907d
Merge branch 'master' into master 2021-06-25 11:39:44 +02:00
Nemanja Tosic
7afa2e6643 Fix beforeunload memory leak 2021-05-30 13:42:01 +02:00
Kevin Jahns
e3615979b4 use condititional exports of dependencies 2021-05-20 13:00:45 +02:00
Kevin Jahns
010658f74f Remove dependency on window - fixes #65 2021-05-17 17:26:33 +02:00
Hans Pagel
42cf230ed5
add on exit handler for Node.js environments 2021-02-23 23:22:21 +01:00
Kevin Jahns
02f691d89c lint 2021-02-14 15:44:47 +01:00
Kevin Jahns
e929a3a11e remove node types from client code 2021-02-06 14:00:39 +01:00
Kevin Jahns
356370db26 Extendable messageHanlers 2021-02-03 15:04:18 +01:00
Kevin Jahns
2a3d623232 API Docs 2020-12-18 12:16:52 +01:00
Kevin Jahns
0fbd2cd0d0 Keep awareness state after disconnect - fixes yjs/y-protocols#7 2020-12-04 13:05:30 +01:00
Kevin Jahns
f254df3b00 lint 2020-11-19 14:11:24 +01:00
Tom Moor
e1071dab1e
fix: Move "connecting" event to be emitted after websocket event handlers are bound 2020-11-06 14:42:12 -08:00
Kevin Jahns
d3b9dd208d linting 2020-10-30 22:22:37 +01:00
Kevin Jahns
82e0344476
Merge pull request #34 from tommoor/patch-1
feat: Add 'connecting' event
2020-10-18 17:57:02 +02:00
Kevin Jahns
8e73d39887
Merge pull request #36 from tommoor/patch-3
fix: Remove unused _localAwarenessState
2020-10-18 17:55:17 +02:00
Tom Moor
82435ef642
fix: Remove unused _localAwarenessState 2020-10-17 17:29:12 -07:00
Tom Moor
c0271b7cdc
fix: Message publishing happens down incorrect broadcast channel
Missed in #12 refactor
2020-10-17 16:53:24 -07:00
Tom Moor
72c9978ceb
feat: Add 'connecting' event
As described in the [comment here](https://github.com/yjs/y-websocket/issues/7#issuecomment-623114183), a "connecting" event is useful for monkey-patching the authentication process in lieu of a more official API.

Seems like this is a no-brainer addition.
2020-10-15 15:12:04 -07:00
Kevin Jahns
2b31b72b02 remove alert message - fixes #31 2020-10-10 17:04:06 +02:00
Kevin Jahns
ce66920e31 implement resyncInterval - #19 2020-07-10 03:19:08 +02:00
Kevin Jahns
dedc7f56a6 implemented WebSocket polyfill - implements #17 2020-07-10 02:48:25 +02:00
Kevin Jahns
01d8c2a3f5 bump y-protocols for better event handling 2020-06-05 04:11:14 +02:00
Kevin Jahns
1ba2b7a0e7 lint 2020-04-02 12:18:26 +02:00
Kevin Jahns
15a9c99833 Use url without query params for broadcastchannel. fixes #12 2020-04-02 11:55:45 +02:00
Kevin Jahns
0e4413f06d increase disconnected-check interval timeout 2020-04-02 11:50:46 +02:00
Duane Johnson
612bf04423 Add a 500ms delay to setInterval to reduce CPU load 2020-03-30 21:14:58 -06:00
Kevin Jahns
1c8c3cc7ba correct query param 2020-02-18 16:53:50 -06:00
Kevin Jahns
68d00c0a92 support query parameters 2020-02-18 15:17:27 -06:00
Kevin Jahns
4da78d07e0 support start disconnected 2020-01-23 05:03:38 +01:00
Kevin Jahns
dbfce63d6f cjs module 2020-01-13 15:51:35 +01:00