From aedac70b63d6eb60dbf92534205f96b9915a9e7e Mon Sep 17 00:00:00 2001 From: Jason <59297610+caracal-js@users.noreply.github.com> Date: Sat, 26 Feb 2022 21:06:06 -0500 Subject: [PATCH] WebSocket properties --- lib/uv.bundle.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/uv.bundle.js b/lib/uv.bundle.js index e1b50164..57ed9a44 100644 --- a/lib/uv.bundle.js +++ b/lib/uv.bundle.js @@ -37985,6 +37985,10 @@ class WebSocketApi extends _events_js__WEBPACK_IMPORTED_MODULE_0__["default"] { this.protocol = ctx.nativeMethods.getOwnPropertyDescriptor(this.wsProto, 'protocol'); this.send = this.wsProto.send; this.close = this.wsProto.close; + this.CONNECTING = 0; + this.OPEN = 1; + this.CLOSING = 2; + this.CLOSED = 3; }; overrideWebSocket() { this.ctx.override(this.window, 'WebSocket', (target, that, args) => { @@ -37998,6 +38002,11 @@ class WebSocketApi extends _events_js__WEBPACK_IMPORTED_MODULE_0__["default"] { if (event.intercepted) return event.returnValue; return new event.target(event.data.url, event.data.protocols); }, true); + + this.window.WebSocket.CONNECTING = this.CONNECTING; + this.window.WebSocket.OPEN = this.OPEN; + this.window.WebSocket.CLOSING = this.CLOSING; + this.window.WebSocket.CLOSED = this.CLOSED; }; overrideUrl() { this.ctx.overrideDescriptor(this.wsProto, 'url', {