Skip to content

Commit 4c6c5fd

Browse files
author
Avaer Kazmer
committed
Clean up Window.js worker startup script injection
1 parent 209b710 commit 4c6c5fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Window.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,10 @@ function _makeWindow(window = {}, htmlString = '', options = {}) {
10061006
constructor(src, workerOptions = {}) {
10071007
workerOptions.startScript = `
10081008
(() => {
1009-
${windowStartScript}
1009+
const workerThreads = require('worker_threads');
1010+
const {workerData} = workerThreads;
1011+
global.args = workerData.args;
1012+
(${windowStartFn.toString()})(global);
10101013
10111014
const bindings = requireNative("nativeBindings");
10121015
const smiggles = require("smiggles");

0 commit comments

Comments
 (0)