Loading Scripts

You can load custom scripts into your Developer Portal using the portal.loadJS() method. Pass in the path of the JavaScript file as an argument:
// Load a custom CSS file
portal.loadJS('/path/to/your/file.js');
If a callback should run after the script loads, pass that in as the second argument:
// Load a custom CSS file
portal.loadJS('/path/to/your/file.js', function () {
    console.log('the file loaded!');
});
By default, the portal.loadJS() method will load JavaScript files asynchronously and does not maintain loading order. If they should be loaded in order, pass in a third argument as true (this can be the second argument if there is no callback function):
/**
 * Maintain File Load Order
 */

portal.loadJS('/path/to/your/load-first.js', function () {
    console.log('the file loaded!');
}, true);
portal.loadJS('/path/to/your/load-second.js', true);
portal.loadJS('/path/to/your/load-third.js', true);