summaryrefslogtreecommitdiff
path: root/cli/standalone.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-02-11 13:41:56 +0100
committerGitHub <noreply@github.com>2022-02-11 13:41:56 +0100
commit2fa0096821cd04334210fcae6f54f85d304dc17a (patch)
treef4c76302e48861e2d7cf802feab9f3d560fd1c9c /cli/standalone.rs
parent2f2c778a074d0eff991c6c22da54429de3de6704 (diff)
compat: support --compat in web workers (#13629)
Adds another callback to WebWorkerOptions that allows to execute some modules before actual worker code executes. This allows to set up Node global using std/node.
Diffstat (limited to 'cli/standalone.rs')
-rw-r--r--cli/standalone.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/standalone.rs b/cli/standalone.rs
index e31fa15f7..a50e7d80d 100644
--- a/cli/standalone.rs
+++ b/cli/standalone.rs
@@ -208,6 +208,9 @@ pub async fn run(
let create_web_worker_cb = Arc::new(|_| {
todo!("Worker are currently not supported in standalone binaries");
});
+ let web_worker_preload_module_cb = Arc::new(|_| {
+ todo!("Worker are currently not supported in standalone binaries");
+ });
// Keep in sync with `main.rs`.
v8_set_flags(
@@ -257,6 +260,7 @@ pub async fn run(
seed: metadata.seed,
js_error_create_fn: None,
create_web_worker_cb,
+ web_worker_preload_module_cb,
maybe_inspector_server: None,
should_break_on_first_statement: false,
module_loader,