Evaluate Module vs Run Script? #25880
-
Hi, I'm learning the For example, in the (very simple) Hello, runjs! sample code in Roll your own JavaScript runtime blog. Roughly speaking (please correct me if I'm wrong),
But, I'm confused that, there's also an API v8::Script::run. Can I simply create a v8 What's the difference between these two groups of APIs?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This page has more information about the differences between scripts and modules in JavaScript engines https://v8.dev/features/modules |
Beta Was this translation helpful? Give feedback.
-
By the time
Remote modules are already downloaded, this function keeps going as long as there are async actions pending (think timers, reads from net socket, etc).
Correct |
Beta Was this translation helpful? Give feedback.
By the time
load_main_es_module
all remote modules need to be downloaded and loaded into the V8 as wellRemote modules are already downloaded, thi…