Skip to content

Commit

Permalink
bootstrap: include event_target into the built-in snapshot
Browse files Browse the repository at this point in the history
Since the module has to be loaded during bootstrap anyway.

PR-URL: #45849
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
joyeecheung authored and targos committed Jan 1, 2023
1 parent dd77c05 commit 508e830
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/internal/bootstrap/browser.js
Expand Up @@ -42,9 +42,11 @@ defineOperation(globalThis, 'setTimeout', timers.setTimeout);
exposeLazyInterfaces(globalThis, 'internal/abort_controller', [
'AbortController', 'AbortSignal',
]);
exposeLazyInterfaces(globalThis, 'internal/event_target', [
'EventTarget', 'Event',
]);
const {
EventTarget, Event,
} = require('internal/event_target');
exposeInterface(globalThis, 'Event', Event);
exposeInterface(globalThis, 'EventTarget', EventTarget);
exposeLazyInterfaces(globalThis, 'internal/worker/io', [
'MessageChannel', 'MessagePort', 'MessageEvent',
]);
Expand Down

0 comments on commit 508e830

Please sign in to comment.