MCPcopy
hub / github.com/webpack/webpack / create262Host

Function create262Host

test/test262.spectest.js:620–633  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

618 };
619
620const create262Host = (context) => ({
621 evalScript(code, options = {}) {
622 return vm.runInContext(code, context, options);
623 },
624 createRealm() {
625 const newSandbox = vm.runInNewContext("this");
626 const newContext = vm.createContext(newSandbox);
627 const newHost = create262Host(newContext);
628
629 newHost.global = newContext;
630
631 return newHost;
632 }
633});
634
635const createImportModuleDynamically =
636 (context, testFile, moduleCache) => async (specifier, referencing) => {

Callers 2

createRealmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected