Skip to content

Commit 508e830

Browse files
joyeecheungtargos
authored andcommitted
bootstrap: include event_target into the built-in snapshot
Since the module has to be loaded during bootstrap anyway. PR-URL: #45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent dd77c05 commit 508e830

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/internal/bootstrap/browser.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ defineOperation(globalThis, 'setTimeout', timers.setTimeout);
4242
exposeLazyInterfaces(globalThis, 'internal/abort_controller', [
4343
'AbortController', 'AbortSignal',
4444
]);
45-
exposeLazyInterfaces(globalThis, 'internal/event_target', [
46-
'EventTarget', 'Event',
47-
]);
45+
const {
46+
EventTarget, Event,
47+
} = require('internal/event_target');
48+
exposeInterface(globalThis, 'Event', Event);
49+
exposeInterface(globalThis, 'EventTarget', EventTarget);
4850
exposeLazyInterfaces(globalThis, 'internal/worker/io', [
4951
'MessageChannel', 'MessagePort', 'MessageEvent',
5052
]);

0 commit comments

Comments
 (0)