@@ -1,17 +1,21 @@
 | 
			
		||||
(function(root, logger) {
 | 
			
		||||
    // Init Global Value
 | 
			
		||||
    global.root = root;
 | 
			
		||||
    global.logger = logger;
 | 
			
		||||
    // Init Global Function
 | 
			
		||||
    global.noop = global.engineDisable = function() { };
 | 
			
		||||
    // disable 
 | 
			
		||||
    global.engineLoad = load;
 | 
			
		||||
    global.load = function __PreventGlobalLoadFunction__() {
 | 
			
		||||
        throw new Error('Internal engine system not allow use `load` function!');
 | 
			
		||||
    };
 | 
			
		||||
    // Init console and require
 | 
			
		||||
    global.console = engineLoad(global.root + '/core/console.js')(logger);
 | 
			
		||||
    global.require = engineLoad(global.root + '/core/require.js')(root);
 | 
			
		||||
    String.prototype.contains = function(searchString/*, position*/) {
 | 
			
		||||
        return String.prototype.indexOf.call(this, searchString, arguments[1]) > -1;
 | 
			
		||||
    // String contains playfill
 | 
			
		||||
    String.prototype.contains = function(searchString, position) {
 | 
			
		||||
        return String.prototype.indexOf.call(this, searchString, position) > -1;
 | 
			
		||||
    };
 | 
			
		||||
    // ES6 Map Symbol playfill
 | 
			
		||||
    require('es6-map/implement');
 | 
			
		||||
    require('es6-symbol/implement');
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user