feat: optimize ployfill
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
2a891c1117
commit
00287ff80a
@ -7,17 +7,12 @@
|
|||||||
// Init Global Value
|
// Init Global Value
|
||||||
global.root = root;
|
global.root = root;
|
||||||
global.logger = logger;
|
global.logger = logger;
|
||||||
// Init Global Function
|
|
||||||
global.noop = global.engineDisable = function() { };
|
|
||||||
global.engineLoad = load;
|
|
||||||
global.load = load = function __PreventGlobalLoadFunction__() {
|
|
||||||
throw new Error('Internal engine system not allow use `load` function!');
|
|
||||||
}
|
|
||||||
global.NashornEngineStartTime = new Date().getTime()
|
global.NashornEngineStartTime = new Date().getTime()
|
||||||
|
global.engineLoad = load;
|
||||||
|
global.noop = global.engineDisable = engineDisable = function() { };
|
||||||
|
global.load = load = function __PreventGlobalLoadFunction__() { throw new Error('Internal engine system not allow use `load` function!'); }
|
||||||
|
global.setGlobal = function(key, value) { global[key] = value; };
|
||||||
// Init console and require
|
// Init console and require
|
||||||
global.setGlobal = function(key, value) {
|
|
||||||
global[key] = value;
|
|
||||||
}
|
|
||||||
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);
|
||||||
require('@ms/ployfill')
|
require('@ms/ployfill')
|
||||||
|
Loading…
Reference in New Issue
Block a user