- commit
- 9d2e2bd0a6b81bdf091b8489f2c47276b504713e
- parent
- edaaaf7545194c210b6d38f3f8107cdc3b8bbc89
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2018-12-28 11:11
work around use of eval in axe-core
Diffstat
| M | Makefile | 3 | ++- |
| M | babel.js | 4 | ++-- |
| A | src/eval.patch | 8 | ++++++++ |
3 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
@@ -1,2 +1,3 @@1 -1 babel.js: src/babel.js src/axs.js-1 1 babel.js: src/babel.js src/axs.js src/eval.patch 2 2 browserify $< -o $@ -1 3 patch $@ src/eval.patch
diff --git a/babel.js b/babel.js
@@ -7380,7 +7380,7 @@ module.exports = {
7380 7380 }();
7381 7381 'use strict';
7382 7382 axe.imports['doT'] = function(module, exports, define, require, process) {
7383 -1 var global = Function('return this')();
-1 7383 var global = {};
7384 7384 var __old_global__ = global['doT'];
7385 7385 (function() {
7386 7386 'use strict';
@@ -7423,7 +7423,7 @@ module.exports = {
7423 7423 };
7424 7424 };
7425 7425 _globals = function() {
7426 -1 return this || (0, eval)('this');
-1 7426 return this || {};
7427 7427 }();
7428 7428 if (typeof module !== 'undefined' && module.exports) {
7429 7429 module.exports = doT;
diff --git a/src/eval.patch b/src/eval.patch
@@ -0,0 +1,8 @@
-1 1 7383c7383
-1 2 < var global = Function('return this')();
-1 3 ---
-1 4 > var global = {};
-1 5 7426c7426
-1 6 < return this || (0, eval)('this');
-1 7 ---
-1 8 > return this || {};