Skip to content

Commit

Permalink
ref: use globalThis.CloseEvent whenever possible or fallback to cus…
Browse files Browse the repository at this point in the history
…tom CloseEvent class
  • Loading branch information
Yovach committed Jul 18, 2024
1 parent da69a9f commit 64f7c92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/node-ws/src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface CloseEventInit extends EventInit {
/**
* @link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
*/
export class CloseEvent extends Event {
export const CloseEvent = globalThis.CloseEvent ?? class extends Event {
#eventInitDict

constructor(
Expand Down

0 comments on commit 64f7c92

Please sign in to comment.