Asynchronously load a JavaScript file by adding a script tag to the header of the document.
Parameter | Type | Description |
---|---|---|
path | String | Absolute or relative path to the source file. If relative it is relative to the current document's location. |
callback | Function | Function called when the script completes loading or fails to load. |
optionalDocument | HTMLDocument | Document to which to add the script tag. Defaults to global document. |
0 Comments