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

Method appendScript

external/.scrollLibs.js:24135–24142  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

24133 return location.hostname
24134 }
24135 async appendScript(url) {
24136 if (!url) return undefined
24137 if (!this._loadingPromises) this._loadingPromises = {}
24138 if (this._loadingPromises[url]) return this._loadingPromises[url]
24139 if (this.isNodeJs()) return undefined
24140 this._loadingPromises[url] = this._appendScript(url)
24141 return this._loadingPromises[url]
24142 }
24143 _appendScript(url) {
24144 //https://bradb.net/blog/promise-based-js-script-loader/
24145 return new Promise(function (resolve, reject) {

Callers

nothing calls this directly

Calls 2

_appendScriptMethod · 0.95
isNodeJsMethod · 0.45

Tested by

no test coverage detected