(script: string, scriptType?: string)
| 4 | const logger = new Logger({ level: 'warn', bizName: 'utils' }); |
| 5 | |
| 6 | export 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 | |
| 14 | export function load(url: string, scriptType?: string) { |
| 15 | const node = document.createElement('script'); |
no test coverage detected
searching dependent graphs…