MCPcopy Create free account
hub / github.com/DustinBrett/daedalOS / loadFiles

Function loadFiles

utils/functions.ts:377–390  ·  view source on GitHub ↗
(
  files?: string[],
  defer?: boolean,
  force?: boolean,
  asModule?: boolean,
  contentWindow?: Window
)

Source from the content-addressed store, hash-verified

375 });
376
377export const loadFiles = async (
378 files?: string[],
379 defer?: boolean,
380 force?: boolean,
381 asModule?: boolean,
382 contentWindow?: Window
383): Promise<void> =>
384 !files || files.length === 0
385 ? Promise.resolve()
386 : files.reduce(async (_promise, file) => {
387 await (getExtension(file) === ".css"
388 ? loadStyle(encodeURI(file), contentWindow)
389 : loadScript(encodeURI(file), defer, force, asModule, contentWindow));
390 }, Promise.resolve());
391
392type WindowWithHtmlToImage = Window & { htmlToImage?: typeof HtmlToImage };
393

Callers 15

useBoxedWineFunction · 0.90
useTinyMCEFunction · 0.90
useTerminalFunction · 0.90
runPythonFunction · 0.90
useCommandInterpreterFunction · 0.90
useEmulatorFunction · 0.90
loadMilkdropWhenNeededFunction · 0.90
WebampFunction · 0.90
VimFunction · 0.90
useDXBallFunction · 0.90
ChessFunction · 0.90
useQuake3Function · 0.90

Calls 5

getExtensionFunction · 0.85
loadStyleFunction · 0.70
loadScriptFunction · 0.70
resolveMethod · 0.45
reduceMethod · 0.45

Tested by

no test coverage detected