summaryrefslogtreecommitdiff
path: root/cli/js/runtime_worker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/runtime_worker.ts')
-rw-r--r--cli/js/runtime_worker.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/js/runtime_worker.ts b/cli/js/runtime_worker.ts
index 8881b438b..1e7a9a67d 100644
--- a/cli/js/runtime_worker.ts
+++ b/cli/js/runtime_worker.ts
@@ -107,7 +107,10 @@ export const workerRuntimeGlobalProperties = {
workerMessageRecvCallback: nonEnumerable(workerMessageRecvCallback),
};
-export function bootstrapWorkerRuntime(name: string): void {
+export function bootstrapWorkerRuntime(
+ name: string,
+ internalName?: string
+): void {
if (hasBootstrapped) {
throw new Error("Worker runtime already bootstrapped");
}
@@ -119,7 +122,7 @@ export function bootstrapWorkerRuntime(name: string): void {
Object.defineProperties(globalThis, eventTargetProperties);
Object.defineProperties(globalThis, { name: readOnly(name) });
setEventTargetData(globalThis);
- const s = runtime.start(name);
+ const s = runtime.start(internalName ?? name);
const location = new LocationImpl(s.location);
immutableDefine(globalThis, "location", location);