Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 562b3d4

Browse filesBrowse files
legendecasRafaelGSS
authored andcommitted
lib: move web global bootstrapping to the expected file
PR-URL: #47881 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
1 parent d623616 commit 562b3d4
Copy full SHA for 562b3d4

File tree

Expand file treeCollapse file tree

2 files changed

+13
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-13
lines changed
Open diff view settings
Collapse file

‎lib/internal/bootstrap/node.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ const internalTimers = require('internal/timers');
7070
const {
7171
defineOperation,
7272
deprecate,
73-
defineLazyProperties,
7473
} = require('internal/util');
7574
const {
7675
validateInteger,
@@ -208,22 +207,12 @@ internalBinding('async_wrap').setupHooks(nativeHooks);
208207

209208
const {
210209
setupTaskQueue,
211-
queueMicrotask,
212210
} = require('internal/process/task_queues');
213-
214-
// Non-standard extensions:
215-
defineOperation(globalThis, 'queueMicrotask', queueMicrotask);
216-
217211
const timers = require('timers');
212+
// Non-standard extensions:
218213
defineOperation(globalThis, 'clearImmediate', timers.clearImmediate);
219214
defineOperation(globalThis, 'setImmediate', timers.setImmediate);
220215

221-
defineLazyProperties(
222-
globalThis,
223-
'internal/structured_clone',
224-
['structuredClone'],
225-
);
226-
227216
// Set the per-Environment callback that will be called
228217
// when the TrackingTraceStateObserver updates trace state.
229218
// Note that when NODE_USE_V8_PLATFORM is true, the observer is
Collapse file

‎lib/internal/bootstrap/web/exposed-window-or-worker.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/web/exposed-window-or-worker.js
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,23 @@ defineOperation(globalThis, 'clearTimeout', timers.clearTimeout);
2626
defineOperation(globalThis, 'setInterval', timers.setInterval);
2727
defineOperation(globalThis, 'setTimeout', timers.setTimeout);
2828

29+
const {
30+
queueMicrotask,
31+
} = require('internal/process/task_queues');
32+
defineOperation(globalThis, 'queueMicrotask', queueMicrotask);
33+
34+
defineLazyProperties(
35+
globalThis,
36+
'internal/structured_clone',
37+
['structuredClone'],
38+
);
39+
defineLazyProperties(globalThis, 'buffer', ['atob', 'btoa']);
40+
2941
// https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts
3042
exposeLazyInterfaces(globalThis, 'internal/worker/io', ['BroadcastChannel']);
3143
exposeLazyInterfaces(globalThis, 'internal/worker/io', [
3244
'MessageChannel', 'MessagePort', 'MessageEvent',
3345
]);
34-
defineLazyProperties(globalThis, 'buffer', ['atob', 'btoa']);
3546
// https://www.w3.org/TR/FileAPI/#dfn-Blob
3647
exposeLazyInterfaces(globalThis, 'internal/blob', ['Blob']);
3748
// https://www.w3.org/TR/FileAPI/#dfn-file

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.