Upgrade to ECMAScript 2020

This is needed in order to use `globalThis`, see #1894.
It also made it possible to remove some old polyfills and fallbacks.
This commit is contained in:
Jakob Linskeseder
2022-10-19 22:25:44 +02:00
committed by Jay Linski
parent da41887377
commit f6ff3bf52b
21 changed files with 1200 additions and 1627 deletions
@@ -128,6 +128,7 @@ JavaScriptCompiler.prototype = {
this.decorators.push('return fn;');
if (asObject) {
// eslint-disable-next-line no-new-func
this.decorators = Function.apply(this, [
'fn',
'props',
@@ -260,7 +261,7 @@ JavaScriptCompiler.prototype = {
if (asObject) {
params.push(source);
return Function.apply(this, params);
return Function.apply(this, params); // eslint-disable-line no-new-func
} else {
return this.source.wrap([
'function(',