MCPcopy Index your code
hub / github.com/arfct/itty-bitty / loadScript

Function loadScript

docs/render.js:60–65  ·  view source on GitHub ↗
(src, callback, type = "module")

Source from the content-addressed store, hash-verified

58}
59
60function loadScript(src, callback, type = "module") {
61 let promise = new Promise((resolve, reject) => {
62 document.head.appendChild(el("script", { src, type, onload:resolve}));
63 })
64 return callback ? promise.then(callback) : promise;
65}
66
67function loadSyle(href, callback) {
68 let promise = new Promise((resolve, reject) => {

Callers 1

renderScriptContentFunction · 0.70

Calls 1

elFunction · 0.70

Tested by

no test coverage detected