mirror of
https://github.com/denoland/deno.git
synced 2025-08-08 12:58:20 +00:00
docs: Improve mod_evaluate
documentation (#14827)
This commit is contained in:
parent
4cbb2567b5
commit
94d369ebc6
3 changed files with 10 additions and 9 deletions
|
@ -28,9 +28,9 @@ fn main() -> Result<(), Error> {
|
|||
|
||||
let future = async move {
|
||||
let mod_id = js_runtime.load_main_module(&main_module, None).await?;
|
||||
let _ = js_runtime.mod_evaluate(mod_id);
|
||||
let result = js_runtime.mod_evaluate(mod_id);
|
||||
js_runtime.run_event_loop(false).await?;
|
||||
Ok(())
|
||||
result.await?
|
||||
};
|
||||
runtime.block_on(future)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue