dist/scalejs.core.js
function buildSandbox(id) {
    if (!has(id)) {
        throw new Error('Sandbox name is required to build a sandbox.');
    }

    // Create module instance specific sandbox
    var sandbox = {
        type: self.type,
        object: self.object,
        array: self.array,
        log: self.log
    };

    // Add extensions to sandbox
    extensions.forEach(function (extension) {
        try {

            // If extension has buildSandbox method use it to build sandbox
            if (is(extension, 'buildSandbox', 'function')) {
                extension.buildSandbox(sandbox);
            }

            // If extension has a sandbox object add it
            else if (has(extension, 'sandbox')) {
                    extend(sandbox, extension.sandbox);
                }

                // Otherwise extend the sandbox with the extension
                else {
                        extend(sandbox, extension);
                    }
        } catch (ex) {
            error('Fatal error during application initialization. ', 'Failed to build sandbox with extension "', extension, 'See following exception for more details.', ex);
            throw ex;
        }
    });

    return sandbox;
}
function buildSandbox(id) {
    if (!has(id)) {
        throw new Error('Sandbox name is required to build a sandbox.');
    }

    // Create module instance specific sandbox
    var sandbox = {
        type: self.type,
        object: self.object,
        array: self.array,
        log: self.log
    };

    // Add extensions to sandbox
    extensions.forEach(function (extension) {
        try {

            // If extension has buildSandbox method use it to build sandbox
            if (is(extension, 'buildSandbox', 'function')) {
                extension.buildSandbox(sandbox);
            }

            // If extension has a sandbox object add it
            else if (has(extension, 'sandbox')) {
                    extend(sandbox, extension.sandbox);
                }

                // Otherwise extend the sandbox with the extension
                else {
                        extend(sandbox, extension);
                    }
        } catch (ex) {
            error('Fatal error during application initialization. ', 'Failed to build sandbox with extension "', extension, 'See following exception for more details.', ex);
            throw ex;
        }
    });

    return sandbox;
}
function buildSandbox ( id ) { if ( ! has ( id ) ) { throw new Error ( 'Sandbox name is required to build a sandbox.' ) ; } // Create module instance specific sandbox var sandbox = { type : self . type , object : self . object , array : self . array , log : self . log } ; // Add extensions to sandbox extensions . forEach ( function ( extension ) { try { // If extension has buildSandbox method use it to build sandbox if ( is ( extension , 'buildSandbox' , 'function' ) ) { extension . buildSandbox ( sandbox ) ; } // If extension has a sandbox object add it else if ( has ( extension , 'sandbox' ) ) { extend ( sandbox , extension . sandbox ) ; } // Otherwise extend the sandbox with the extension else { extend ( sandbox , extension ) ; } } catch ( ex ) { error ( 'Fatal error during application initialization. ' , 'Failed to build sandbox with extension "' , extension , 'See following exception for more details.' , ex ) ; throw ex ; } } ) ; return sandbox ; }
Builds a sandbox from the current list of extensions

@param {String} id identifier for the sandbox
@memberOf core
@return {Object} object representing the built sandbox
Builds a sandbox from the current list of extensions