MCPcopy Create free account
hub / github.com/breck7/scroll / appendCodeAndReturnValueOnWindow

Method appendCodeAndReturnValueOnWindow

external/.scrollLibs.js:14388–14393  ·  view source on GitHub ↗
(code, name)

Source from the content-addressed store, hash-verified

14386 return properties.reduce((prev, curr) => prev && prev[curr], obj)
14387 }
14388 static appendCodeAndReturnValueOnWindow(code, name) {
14389 const script = document.createElement("script")
14390 script.innerHTML = code
14391 document.head.appendChild(script)
14392 return window[name]
14393 }
14394 static formatStr(str, catchAllAtomDelimiter = " ", parameterMap) {
14395 return str.replace(/{([^\}]+)}/g, (match, path) => {
14396 const val = parameterMap[path]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected