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

Function evalInRealm

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

Source from the content-addressed store, hash-verified

74// Eval string "code" in the content of realm "realm". Evaluation happens
75// asynchronously, meaning it hasn't happened when the function returns.
76function evalInRealm(realm, code) {
77 realm.postMessage(code, window.origin);
78}
79
80// Same as evalInRealm() but returns a Promise which will resolve when the
81// function has actually.

Callers 1

evalInRealmAndWaitFunction · 0.85

Calls 1

postMessageMethod · 0.45

Tested by

no test coverage detected