interface
vm.CreateContextOptions
interface CreateContextOptions
- importModuleDynamically?: number | DynamicModuleLoader<Context>
Used to specify how the modules should be loaded during the evaluation of this script when
import()is called. This option is part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see Support of dynamicimport()in compilation APIs. - microtaskMode?: 'afterEvaluate'
If set to
afterEvaluate, microtasks will be run immediately after the script has run. - origin?: string
Corresponds to the newly created context for display purposes. The origin should be formatted like a
URL, but with only the scheme, host, and port (if necessary), like the value of theurl.originproperty of a URL object. Most notably, this string should omit the trailing slash, as that denotes a path.