mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 23:59:59 -05:00
refactor: split runtime/98_global_scope.js (#21785)
This commit is contained in:
parent
bfd5f1598c
commit
d1706c2ac9
6 changed files with 245 additions and 207 deletions
|
@ -4,7 +4,7 @@
|
||||||
// deno-lint-ignore-file prefer-primordials
|
// deno-lint-ignore-file prefer-primordials
|
||||||
|
|
||||||
import { Console } from "ext:deno_node/internal/console/constructor.mjs";
|
import { Console } from "ext:deno_node/internal/console/constructor.mjs";
|
||||||
import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope.js";
|
import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js";
|
||||||
// Don't rely on global `console` because during bootstrapping, it is pointing
|
// Don't rely on global `console` because during bootstrapping, it is pointing
|
||||||
// to native `console` object provided by V8.
|
// to native `console` object provided by V8.
|
||||||
const console = windowOrWorkerGlobalScope.console.value;
|
const console = windowOrWorkerGlobalScope.console.value;
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { core, primordials } from "ext:core/mod.js";
|
import { core } from "ext:core/mod.js";
|
||||||
const ops = core.ops;
|
|
||||||
const {
|
|
||||||
ObjectDefineProperties,
|
|
||||||
ObjectPrototypeIsPrototypeOf,
|
|
||||||
SymbolFor,
|
|
||||||
} = primordials;
|
|
||||||
|
|
||||||
import * as util from "ext:runtime/06_util.js";
|
import * as util from "ext:runtime/06_util.js";
|
||||||
import * as location from "ext:deno_web/12_location.js";
|
|
||||||
import * as event from "ext:deno_web/02_event.js";
|
import * as event from "ext:deno_web/02_event.js";
|
||||||
import * as timers from "ext:deno_web/02_timers.js";
|
import * as timers from "ext:deno_web/02_timers.js";
|
||||||
import * as base64 from "ext:deno_web/05_base64.js";
|
import * as base64 from "ext:deno_web/05_base64.js";
|
||||||
|
@ -38,15 +31,8 @@ import * as messagePort from "ext:deno_web/13_message_port.js";
|
||||||
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
||||||
import { DOMException } from "ext:deno_web/01_dom_exception.js";
|
import { DOMException } from "ext:deno_web/01_dom_exception.js";
|
||||||
import * as abortSignal from "ext:deno_web/03_abort_signal.js";
|
import * as abortSignal from "ext:deno_web/03_abort_signal.js";
|
||||||
import * as globalInterfaces from "ext:deno_web/04_global_interfaces.js";
|
|
||||||
import * as webStorage from "ext:deno_webstorage/01_webstorage.js";
|
|
||||||
import * as prompt from "ext:runtime/41_prompt.js";
|
|
||||||
import * as imageData from "ext:deno_web/16_image_data.js";
|
import * as imageData from "ext:deno_web/16_image_data.js";
|
||||||
import {
|
import { webgpu, webGPUNonEnumerable } from "ext:deno_webgpu/00_init.js";
|
||||||
loadWebGPU,
|
|
||||||
webgpu,
|
|
||||||
webGPUNonEnumerable,
|
|
||||||
} from "ext:deno_webgpu/00_init.js";
|
|
||||||
import * as webgpuSurface from "ext:deno_webgpu/02_surface.js";
|
import * as webgpuSurface from "ext:deno_webgpu/02_surface.js";
|
||||||
import { unstableIds } from "ext:runtime/90_deno_ns.js";
|
import { unstableIds } from "ext:runtime/90_deno_ns.js";
|
||||||
|
|
||||||
|
@ -198,189 +184,4 @@ unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = {
|
||||||
GPUCanvasContext: webGPUNonEnumerable(() => webgpuSurface.GPUCanvasContext),
|
GPUCanvasContext: webGPUNonEnumerable(() => webgpuSurface.GPUCanvasContext),
|
||||||
};
|
};
|
||||||
|
|
||||||
class Navigator {
|
export { unstableForWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope };
|
||||||
constructor() {
|
|
||||||
webidl.illegalConstructor();
|
|
||||||
}
|
|
||||||
|
|
||||||
[SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
|
|
||||||
return inspect(
|
|
||||||
console.createFilteredInspectProxy({
|
|
||||||
object: this,
|
|
||||||
evaluate: ObjectPrototypeIsPrototypeOf(NavigatorPrototype, this),
|
|
||||||
keys: [
|
|
||||||
"hardwareConcurrency",
|
|
||||||
"userAgent",
|
|
||||||
"language",
|
|
||||||
"languages",
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
inspectOptions,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const navigator = webidl.createBranded(Navigator);
|
|
||||||
|
|
||||||
function memoizeLazy(f) {
|
|
||||||
let v_ = null;
|
|
||||||
return () => {
|
|
||||||
if (v_ === null) {
|
|
||||||
v_ = f();
|
|
||||||
}
|
|
||||||
return v_;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const numCpus = memoizeLazy(() => ops.op_bootstrap_numcpus());
|
|
||||||
const userAgent = memoizeLazy(() => ops.op_bootstrap_user_agent());
|
|
||||||
const language = memoizeLazy(() => ops.op_bootstrap_language());
|
|
||||||
|
|
||||||
ObjectDefineProperties(Navigator.prototype, {
|
|
||||||
gpu: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, NavigatorPrototype);
|
|
||||||
loadWebGPU();
|
|
||||||
return webgpu.gpu;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hardwareConcurrency: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, NavigatorPrototype);
|
|
||||||
return numCpus();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
userAgent: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, NavigatorPrototype);
|
|
||||||
return userAgent();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
language: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, NavigatorPrototype);
|
|
||||||
return language();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
languages: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, NavigatorPrototype);
|
|
||||||
return [language()];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const NavigatorPrototype = Navigator.prototype;
|
|
||||||
|
|
||||||
class WorkerNavigator {
|
|
||||||
constructor() {
|
|
||||||
webidl.illegalConstructor();
|
|
||||||
}
|
|
||||||
|
|
||||||
[SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
|
|
||||||
return inspect(
|
|
||||||
console.createFilteredInspectProxy({
|
|
||||||
object: this,
|
|
||||||
evaluate: ObjectPrototypeIsPrototypeOf(WorkerNavigatorPrototype, this),
|
|
||||||
keys: [
|
|
||||||
"hardwareConcurrency",
|
|
||||||
"userAgent",
|
|
||||||
"language",
|
|
||||||
"languages",
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
inspectOptions,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const workerNavigator = webidl.createBranded(WorkerNavigator);
|
|
||||||
|
|
||||||
ObjectDefineProperties(WorkerNavigator.prototype, {
|
|
||||||
gpu: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
|
||||||
loadWebGPU();
|
|
||||||
return webgpu.gpu;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hardwareConcurrency: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
|
||||||
return numCpus();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
userAgent: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
|
||||||
return userAgent();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
language: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
|
||||||
return language();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
languages: {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
get() {
|
|
||||||
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
|
||||||
return [language()];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const WorkerNavigatorPrototype = WorkerNavigator.prototype;
|
|
||||||
|
|
||||||
const mainRuntimeGlobalProperties = {
|
|
||||||
Location: location.locationConstructorDescriptor,
|
|
||||||
location: location.locationDescriptor,
|
|
||||||
Window: globalInterfaces.windowConstructorDescriptor,
|
|
||||||
window: util.getterOnly(() => globalThis),
|
|
||||||
self: util.getterOnly(() => globalThis),
|
|
||||||
Navigator: util.nonEnumerable(Navigator),
|
|
||||||
navigator: util.getterOnly(() => navigator),
|
|
||||||
alert: util.writable(prompt.alert),
|
|
||||||
confirm: util.writable(prompt.confirm),
|
|
||||||
prompt: util.writable(prompt.prompt),
|
|
||||||
localStorage: util.getterOnly(webStorage.localStorage),
|
|
||||||
sessionStorage: util.getterOnly(webStorage.sessionStorage),
|
|
||||||
Storage: util.nonEnumerable(webStorage.Storage),
|
|
||||||
};
|
|
||||||
|
|
||||||
const workerRuntimeGlobalProperties = {
|
|
||||||
WorkerLocation: location.workerLocationConstructorDescriptor,
|
|
||||||
location: location.workerLocationDescriptor,
|
|
||||||
WorkerGlobalScope: globalInterfaces.workerGlobalScopeConstructorDescriptor,
|
|
||||||
DedicatedWorkerGlobalScope:
|
|
||||||
globalInterfaces.dedicatedWorkerGlobalScopeConstructorDescriptor,
|
|
||||||
WorkerNavigator: util.nonEnumerable(WorkerNavigator),
|
|
||||||
navigator: util.getterOnly(() => workerNavigator),
|
|
||||||
self: util.getterOnly(() => globalThis),
|
|
||||||
};
|
|
||||||
|
|
||||||
export {
|
|
||||||
mainRuntimeGlobalProperties,
|
|
||||||
memoizeLazy,
|
|
||||||
unstableForWindowOrWorkerGlobalScope,
|
|
||||||
windowOrWorkerGlobalScope,
|
|
||||||
workerRuntimeGlobalProperties,
|
|
||||||
};
|
|
119
runtime/js/98_global_scope_window.js
Normal file
119
runtime/js/98_global_scope_window.js
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
|
import { core, primordials } from "ext:core/mod.js";
|
||||||
|
const ops = core.ops;
|
||||||
|
const {
|
||||||
|
ObjectDefineProperties,
|
||||||
|
ObjectPrototypeIsPrototypeOf,
|
||||||
|
SymbolFor,
|
||||||
|
} = primordials;
|
||||||
|
|
||||||
|
import * as util from "ext:runtime/06_util.js";
|
||||||
|
import * as location from "ext:deno_web/12_location.js";
|
||||||
|
import * as console from "ext:deno_console/01_console.js";
|
||||||
|
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
||||||
|
import * as globalInterfaces from "ext:deno_web/04_global_interfaces.js";
|
||||||
|
import * as webStorage from "ext:deno_webstorage/01_webstorage.js";
|
||||||
|
import * as prompt from "ext:runtime/41_prompt.js";
|
||||||
|
import { loadWebGPU, webgpu } from "ext:deno_webgpu/00_init.js";
|
||||||
|
|
||||||
|
class Navigator {
|
||||||
|
constructor() {
|
||||||
|
webidl.illegalConstructor();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
|
||||||
|
return inspect(
|
||||||
|
console.createFilteredInspectProxy({
|
||||||
|
object: this,
|
||||||
|
evaluate: ObjectPrototypeIsPrototypeOf(NavigatorPrototype, this),
|
||||||
|
keys: [
|
||||||
|
"hardwareConcurrency",
|
||||||
|
"userAgent",
|
||||||
|
"language",
|
||||||
|
"languages",
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
inspectOptions,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const navigator = webidl.createBranded(Navigator);
|
||||||
|
|
||||||
|
function memoizeLazy(f) {
|
||||||
|
let v_ = null;
|
||||||
|
return () => {
|
||||||
|
if (v_ === null) {
|
||||||
|
v_ = f();
|
||||||
|
}
|
||||||
|
return v_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const numCpus = memoizeLazy(() => ops.op_bootstrap_numcpus());
|
||||||
|
const userAgent = memoizeLazy(() => ops.op_bootstrap_user_agent());
|
||||||
|
const language = memoizeLazy(() => ops.op_bootstrap_language());
|
||||||
|
|
||||||
|
ObjectDefineProperties(Navigator.prototype, {
|
||||||
|
gpu: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, NavigatorPrototype);
|
||||||
|
loadWebGPU();
|
||||||
|
return webgpu.gpu;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hardwareConcurrency: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, NavigatorPrototype);
|
||||||
|
return numCpus();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
userAgent: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, NavigatorPrototype);
|
||||||
|
return userAgent();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
language: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, NavigatorPrototype);
|
||||||
|
return language();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
languages: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, NavigatorPrototype);
|
||||||
|
return [language()];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const NavigatorPrototype = Navigator.prototype;
|
||||||
|
|
||||||
|
const mainRuntimeGlobalProperties = {
|
||||||
|
Location: location.locationConstructorDescriptor,
|
||||||
|
location: location.locationDescriptor,
|
||||||
|
Window: globalInterfaces.windowConstructorDescriptor,
|
||||||
|
window: util.getterOnly(() => globalThis),
|
||||||
|
self: util.getterOnly(() => globalThis),
|
||||||
|
Navigator: util.nonEnumerable(Navigator),
|
||||||
|
navigator: util.getterOnly(() => navigator),
|
||||||
|
alert: util.writable(prompt.alert),
|
||||||
|
confirm: util.writable(prompt.confirm),
|
||||||
|
prompt: util.writable(prompt.prompt),
|
||||||
|
localStorage: util.getterOnly(webStorage.localStorage),
|
||||||
|
sessionStorage: util.getterOnly(webStorage.sessionStorage),
|
||||||
|
Storage: util.nonEnumerable(webStorage.Storage),
|
||||||
|
};
|
||||||
|
|
||||||
|
export { mainRuntimeGlobalProperties, memoizeLazy };
|
112
runtime/js/98_global_scope_worker.js
Normal file
112
runtime/js/98_global_scope_worker.js
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
|
import { core, primordials } from "ext:core/mod.js";
|
||||||
|
const ops = core.ops;
|
||||||
|
const {
|
||||||
|
ObjectDefineProperties,
|
||||||
|
ObjectPrototypeIsPrototypeOf,
|
||||||
|
SymbolFor,
|
||||||
|
} = primordials;
|
||||||
|
|
||||||
|
import * as util from "ext:runtime/06_util.js";
|
||||||
|
import * as location from "ext:deno_web/12_location.js";
|
||||||
|
import * as console from "ext:deno_console/01_console.js";
|
||||||
|
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
||||||
|
import * as globalInterfaces from "ext:deno_web/04_global_interfaces.js";
|
||||||
|
import { loadWebGPU, webgpu } from "ext:deno_webgpu/00_init.js";
|
||||||
|
|
||||||
|
function memoizeLazy(f) {
|
||||||
|
let v_ = null;
|
||||||
|
return () => {
|
||||||
|
if (v_ === null) {
|
||||||
|
v_ = f();
|
||||||
|
}
|
||||||
|
return v_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const numCpus = memoizeLazy(() => ops.op_bootstrap_numcpus());
|
||||||
|
const userAgent = memoizeLazy(() => ops.op_bootstrap_user_agent());
|
||||||
|
const language = memoizeLazy(() => ops.op_bootstrap_language());
|
||||||
|
|
||||||
|
class WorkerNavigator {
|
||||||
|
constructor() {
|
||||||
|
webidl.illegalConstructor();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
|
||||||
|
return inspect(
|
||||||
|
console.createFilteredInspectProxy({
|
||||||
|
object: this,
|
||||||
|
evaluate: ObjectPrototypeIsPrototypeOf(WorkerNavigatorPrototype, this),
|
||||||
|
keys: [
|
||||||
|
"hardwareConcurrency",
|
||||||
|
"userAgent",
|
||||||
|
"language",
|
||||||
|
"languages",
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
inspectOptions,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const workerNavigator = webidl.createBranded(WorkerNavigator);
|
||||||
|
|
||||||
|
ObjectDefineProperties(WorkerNavigator.prototype, {
|
||||||
|
gpu: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
||||||
|
loadWebGPU();
|
||||||
|
return webgpu.gpu;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hardwareConcurrency: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
||||||
|
return numCpus();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
userAgent: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
||||||
|
return userAgent();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
language: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
||||||
|
return language();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
languages: {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: true,
|
||||||
|
get() {
|
||||||
|
webidl.assertBranded(this, WorkerNavigatorPrototype);
|
||||||
|
return [language()];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const WorkerNavigatorPrototype = WorkerNavigator.prototype;
|
||||||
|
|
||||||
|
const workerRuntimeGlobalProperties = {
|
||||||
|
WorkerLocation: location.workerLocationConstructorDescriptor,
|
||||||
|
location: location.workerLocationDescriptor,
|
||||||
|
WorkerGlobalScope: globalInterfaces.workerGlobalScopeConstructorDescriptor,
|
||||||
|
DedicatedWorkerGlobalScope:
|
||||||
|
globalInterfaces.dedicatedWorkerGlobalScopeConstructorDescriptor,
|
||||||
|
WorkerNavigator: util.nonEnumerable(WorkerNavigator),
|
||||||
|
navigator: util.getterOnly(() => workerNavigator),
|
||||||
|
self: util.getterOnly(() => globalThis),
|
||||||
|
};
|
||||||
|
|
||||||
|
export { workerRuntimeGlobalProperties };
|
|
@ -57,12 +57,16 @@ import { errors } from "ext:runtime/01_errors.js";
|
||||||
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
import * as webidl from "ext:deno_webidl/00_webidl.js";
|
||||||
import { DOMException } from "ext:deno_web/01_dom_exception.js";
|
import { DOMException } from "ext:deno_web/01_dom_exception.js";
|
||||||
import {
|
import {
|
||||||
mainRuntimeGlobalProperties,
|
|
||||||
memoizeLazy,
|
|
||||||
unstableForWindowOrWorkerGlobalScope,
|
unstableForWindowOrWorkerGlobalScope,
|
||||||
windowOrWorkerGlobalScope,
|
windowOrWorkerGlobalScope,
|
||||||
|
} from "ext:runtime/98_global_scope_shared.js";
|
||||||
|
import {
|
||||||
|
mainRuntimeGlobalProperties,
|
||||||
|
memoizeLazy,
|
||||||
|
} from "ext:runtime/98_global_scope_window.js";
|
||||||
|
import {
|
||||||
workerRuntimeGlobalProperties,
|
workerRuntimeGlobalProperties,
|
||||||
} from "ext:runtime/98_global_scope.js";
|
} from "ext:runtime/98_global_scope_worker.js";
|
||||||
import { SymbolAsyncDispose, SymbolDispose } from "ext:deno_web/00_infra.js";
|
import { SymbolAsyncDispose, SymbolDispose } from "ext:deno_web/00_infra.js";
|
||||||
|
|
||||||
// deno-lint-ignore prefer-primordials
|
// deno-lint-ignore prefer-primordials
|
||||||
|
|
|
@ -49,7 +49,9 @@ extension!(runtime,
|
||||||
"40_tty.js",
|
"40_tty.js",
|
||||||
"41_prompt.js",
|
"41_prompt.js",
|
||||||
"90_deno_ns.js",
|
"90_deno_ns.js",
|
||||||
"98_global_scope.js"
|
"98_global_scope_shared.js",
|
||||||
|
"98_global_scope_window.js",
|
||||||
|
"98_global_scope_worker.js"
|
||||||
],
|
],
|
||||||
customizer = |ext: &mut Extension| {
|
customizer = |ext: &mut Extension| {
|
||||||
#[cfg(not(feature = "exclude_runtime_main_js"))]
|
#[cfg(not(feature = "exclude_runtime_main_js"))]
|
||||||
|
|
Loading…
Reference in a new issue