diff --git a/lib/internal/bootstrap/browser.js b/lib/internal/bootstrap/browser.js index 93ae26f77a1a75..9e63e0679aca4c 100644 --- a/lib/internal/bootstrap/browser.js +++ b/lib/internal/bootstrap/browser.js @@ -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', ]); diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index b407760bdc9e6a..64fb780ae67749 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -46,6 +46,7 @@ const expectedModules = new Set([ 'NativeModule internal/constants', 'NativeModule internal/dns/utils', 'NativeModule internal/errors', + 'NativeModule internal/event_target', 'NativeModule internal/fixed_queue', 'NativeModule internal/fs/utils', 'NativeModule internal/idna', @@ -90,6 +91,7 @@ const expectedModules = new Set([ 'NativeModule internal/vm', 'NativeModule internal/vm/module', 'NativeModule internal/wasm_web_api', + 'NativeModule internal/webidl', 'NativeModule internal/worker/js_transferable', 'Internal Binding blob', 'NativeModule async_hooks', @@ -99,6 +101,7 @@ const expectedModules = new Set([ 'NativeModule url', 'NativeModule internal/v8/startup_snapshot', 'NativeModule vm', + 'NativeModule util', ]); if (!common.isMainThread) {