Namespace: load

just.load(tagnon-null, urlnon-null, handleropt, listeneropt) → {*}

Loads an external file if no other similar element is found.
Source:
core.js, line 985

Parameters:

Name Type Default Description
tag
element_tag A tag name.
url
url The url of the file.
handler
[optional]
just.loadElement~handler appendToHead If it's a function: it will be triggered (without appending the element), otherwise: the element will be appended to head.
listener
[optional]
just.loadElement~listener A function to trigger after the element is appended.
Throws:
document.createElement exception or TypeError if url is missing.
Returns:
The return of the handler.
Type
Any