Closed hanspagel closed 3 years ago
Hey @hanspagel ,
Thanks for the PR! I want to leave the option open to implement an actual storage polyfill for nodejs. So I went with a slightly different approach and added a global event listener storage.onChange(event => ..)
that should be used instead. Hope this works for you. I closed the related issues in y-websocket already. Let me know if there are still issues.
The issue is fixed in lib0@v0.2.41
.
This PR
storage
event listener in the LocalStoragePolyfill.Merging this PR would make y-websocket run in Node.js environments, see https://github.com/yjs/y-websocket/issues/51 https://github.com/yjs/y-websocket/issues/55
Alternative solutions
node-localstorage
to add support for localstorage to Node.js.Let me know if you I can do anything to improve the PR. 💖