Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

system.loader()

Dylan Bickerstaff edited this page Mar 17, 2018 · 5 revisions

Details

This method will load in scripts via ajax, cache them, wrap them, then execute them.

Arguments

system.loader(string path, [function callBack]);

path: Path of the script to be executed.
callBack (Optional): Function to be called when method is finished.
    this keyword: Returns true if loaded successful without errors. False if not.

Injected 'loader' object.

system.loader() will inject an object into the loaded script.

  • loader.path: Will equal the given path to the loaded script.
  • loader.folder: Will equal the folder the loaded script is in.

Example

/* /folder/script.js Contents
console.log('I have been loaded, and cached. My path is: '+loader.path)
*/


var path = '/folder/script.js';

system.loader(path, function() {
    if(this) {
        console.log('I have loaded successfully.');
    }
});


/* Console Log
I have been loaded, and cached. My path is: /folder/script.js
I have loaded successfully.
*/


Webdows Documentation Wiki

system Object

explorer Object

Clone this wiki locally