feat: use dom types and set Proxy global

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-02 01:56:45 +08:00
parent 84d9eb8881
commit 9b3d76b6dd
5 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,6 @@
import './global'
import '@ms/nashorn'
import { Proxy } from './proxy'
import { XMLHttpRequest } from './xml-http-request'
let ployfillStartTime = new Date().getTime();
@ -13,5 +14,6 @@ Object.defineProperty(String.prototype, 'contains', {
// ES6 Map Symbol ployfill
require('es6-map/implement');
require('es6-symbol/implement');
global.setGlobal('Proxy', Proxy)
global.setGlobal('XMLHttpRequest', XMLHttpRequest)
console.info('Java Nashorn ployfill loading completed... Cost (' + (new Date().getTime() - ployfillStartTime) / 1000 + 's)!');