MCPcopy Create free account
hub / github.com/nodejs/node / evalInRealmAndReturn

Function evalInRealmAndReturn

test/fixtures/wpt/encoding/streams/realms.window.js:94–98  ·  view source on GitHub ↗
(realm, code)

Source from the content-addressed store, hash-verified

92// The same as evalInRealmAndWait but returns the result of evaluating "code" as
93// an expression.
94async function evalInRealmAndReturn(realm, code) {
95 const myId = id();
96 await evalInRealmAndWait(realm, `window.${myId} = ${code};`);
97 return realm[myId];
98}
99
100// Constructs an object in constructedRealm and copies it into readRealm and
101// writeRealm. Returns the id that can be used to access the object in those

Callers 5

constructAndStoreFunction · 0.85
readInReadRealmFunction · 0.85
writeInWriteRealmFunction · 0.85
runGenericTestsFunction · 0.85

Calls 2

evalInRealmAndWaitFunction · 0.85
idFunction · 0.50

Tested by

no test coverage detected