Elementals.js

Latest Version: 3.0 RC 1 17 July 2017

Method _.Load.script

Summary:

Loads an external JavaScript file by appending a script Element to the END of document.body. Aka where they huffing belong!!!

Calling Convention:
_.Load.script(src[, attributes])
Parameters:
src
The URI of the script to load
attributes optional
An object of extra attributes to be set on the script tag. Most useful for setting data- parameters or async
Returns:
Nothing

Example

JavaScript

_.Load.script('test.js', { async : true });

Advertisement