Function loadScript
- loadScript(
scriptsrc: string,
options?: { doc?: Document; module?: boolean },
): Promise<HTMLScriptElement>Parameters
- scriptsrc: string
The script source URL
Optionaloptions: { doc?: Document; module?: boolean }Optionaldoc?: DocumentOptionalmodule?: booleanLoad as module
Returns Promise<HTMLScriptElement>
A promise resolving to the script node
- scriptsrc: string
Load a JavaScript file and add it to the DOM