*event message must pass a MessageEvent

This commit is contained in:
Derrick Hammer 2023-02-25 22:11:22 -05:00
parent 29c6a909b8
commit 4d75c11299
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 2 deletions

View File

@ -57,8 +57,10 @@ export default class Socket extends Duplex {
} }
if (this._emulateWebsocket) { if (this._emulateWebsocket) {
// @ts-ignore this.addEventListener("data", (data: any) =>
this.addEventListener("data", (data: any) => this.emit("message", data)); // @ts-ignore
this.emit("message", new MessageEvent("data", { data }))
);
} }
} }