Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

y-websocket

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

y-websocket - npm Package Compare versions

Comparing version 1.3.15 to 1.3.16

1

dist/src/y-websocket.d.ts

@@ -87,2 +87,3 @@ /**

_awarenessUpdateHandler: ({ added, updated, removed }: any, origin: any) => void;
_beforeUnloadHandler: () => void;
_checkInterval: any;

@@ -89,0 +90,0 @@ set synced(arg: boolean);

2

package.json
{
"name": "y-websocket",
"version": "1.3.15",
"version": "1.3.16",
"description": "Websockets provider for Yjs",

@@ -5,0 +5,0 @@ "main": "./dist/y-websocket.cjs",

@@ -279,6 +279,9 @@ /*

}
this._beforeUnloadHandler = () => {
awarenessProtocol.removeAwarenessStates(this.awareness, [doc.clientID], 'window unload')
}
if (typeof window !== 'undefined') {
window.addEventListener('beforeunload', () => {
awarenessProtocol.removeAwarenessStates(this.awareness, [doc.clientID], 'window unload')
})
window.addEventListener('beforeunload', this._beforeUnloadHandler)
} else if (typeof process !== 'undefined') {
process.on('exit', () => this._beforeUnloadHandler)
}

@@ -319,2 +322,7 @@ awareness.on('update', this._awarenessUpdateHandler)

this.disconnect()
if (typeof window !== 'undefined') {
window.removeEventListener('beforeunload', this._beforeUnloadHandler)
} else if (typeof process !== 'undefined') {
process.off('exit', () => this._beforeUnloadHandler)
}
this.awareness.off('update', this._awarenessUpdateHandler)

@@ -321,0 +329,0 @@ this.doc.off('update', this._updateHandler)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc