From b5195b8f67b143d6c38de9ae2295cb364fab0d95 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 2 Jul 2010 17:26:26 -0700 Subject: changed the eval for ie to be able to return a function --- src/Scope.js | 4 ++-- test/testabilityPatch.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Scope.js b/src/Scope.js index e9b61ec4..b45efbce 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -72,8 +72,8 @@ function getterFn(path){ } }); code += ' return self;\n}'; - fn = eval('(' + code + ')'); - fn.toString = function(){ return code; }; + fn = eval('fn = ' + code); + fn["toString"] = function(){ return code; }; return getterFnCache[path] = fn; } diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 3020dfba..b71943f6 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -81,7 +81,7 @@ function sortedHtml(element) { attr.name !='style' && attr.name.substr(0, 6) != 'jQuery') { // in IE we need to check for all of these. - if (!/ng:\d+/.exec(attr.name)) + if (!/ng-\d+/.exec(attr.name)) attrs.push(' ' + attr.name + '="' + attr.value + '"'); } } -- cgit v1.2.3