diff --git a/ext/web/02_event.js b/ext/web/02_event.js index e453474206..6a5db3464c 100644 --- a/ext/web/02_event.js +++ b/ext/web/02_event.js @@ -1527,6 +1527,7 @@ export { CloseEvent, CustomEvent, defineEventHandler, + dispatch, ErrorEvent, Event, EventTarget, diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index 7b23df80f0..7d46fdf2a0 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -15,6 +15,7 @@ import { _skipInternalInit, CloseEvent, defineEventHandler, + dispatch, ErrorEvent, Event, EventTarget, @@ -451,7 +452,7 @@ class WebSocket extends EventTarget { data: value, origin: this[_url], }); - this.dispatchEvent(event); + dispatch(this, event); break; } case 1: { @@ -470,7 +471,7 @@ class WebSocket extends EventTarget { origin: this[_url], [_skipInternalInit]: true, }); - this.dispatchEvent(event); + dispatch(this, event); break; } case 2: {