MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / evaluate

Function evaluate

packages/utils/src/script.ts:6–12  ·  view source on GitHub ↗
(script: string, scriptType?: string)

Source from the content-addressed store, hash-verified

4const logger = new Logger({ level: 'warn', bizName: 'utils' });
5
6export function evaluate(script: string, scriptType?: string) {
7 const scriptEl = document.createElement('script');
8 scriptType && (scriptEl.type = scriptType);
9 scriptEl.text = script;
10 document.head.appendChild(scriptEl);
11 document.head.removeChild(scriptEl);
12}
13
14export function load(url: string, scriptType?: string) {
15 const node = document.createElement('script');

Callers 2

script.test.tsFile · 0.90
loadScriptMethod · 0.90

Calls 2

removeChildMethod · 0.80
createElementMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…