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

system.loader()

krisdb2009 edited this page Oct 19, 2017 · 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 'script' object.

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

  • script.path: Will equal the given path to the loaded script.

Example

/* /folder/script.js Contents
console.log('I have been loaded, and cached. My path is: '+script.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