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