Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(runtime): "Worker::execute_script" returns value #17092

Merged
merged 5 commits into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add v8 dependence and fix tests
  • Loading branch information
gofenix committed Dec 17, 2022
commit 8055bc5d8fb779a7feb75aeb67fb96966e1a3387
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ signal-hook-registry = "1.4.0"
termcolor = "1.1.3"
tokio.workspace = true
uuid.workspace = true
v8.workspace = true
gofenix marked this conversation as resolved.
Show resolved Hide resolved

[target.'cfg(windows)'.dependencies]
fwdansi.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions runtime/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ impl MainWorker {
// it. Instead we're using global `dispatchEvent` function which will
// used a saved reference to global scope.
"dispatchEvent(new Event('load'))",
)
)?;
Ok(())
}

/// Dispatches "unload" event to the JavaScript runtime.
Expand All @@ -446,7 +447,8 @@ impl MainWorker {
// it. Instead we're using global `dispatchEvent` function which will
// used a saved reference to global scope.
"dispatchEvent(new Event('unload'))",
)
)?;
Ok(())
}

/// Dispatches "beforeunload" event to the JavaScript runtime. Returns a boolean
Expand Down