From 15868fb25ab00059b873f5614bd5902b305b0a78 Mon Sep 17 00:00:00 2001 From: "Scott J. Miles" Date: Wed, 30 Oct 2013 09:59:40 -0700 Subject: [PATCH] must set `hasEval` to false if the Function() constructor test throws --- src/wrappers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wrappers.js b/src/wrappers.js index 28f7536..9a4db8a 100644 --- a/src/wrappers.js +++ b/src/wrappers.js @@ -21,6 +21,7 @@ var ShadowDOMPolyfill = {}; var f = new Function('', 'return true;'); hasEval = f(); } catch (ex) { + hasEval = false; } } @@ -370,4 +371,4 @@ var ShadowDOMPolyfill = {}; scope.wrapIfNeeded = wrapIfNeeded; scope.wrappers = wrappers; -})(this.ShadowDOMPolyfill); \ No newline at end of file +})(this.ShadowDOMPolyfill);