3

I would like to know if the Function constructor is supported down to IE7 (MDN says "?").

It seems to be working in IE10 using IE7 mode, but I can't install a native IE7 version since I'm on windows 7.

To anyone whos intrested in the use case:

// expressionFromServer example: 'x.foo < 3 && x.bar != 5'

var filteredRows = 
    $.grep(availableActivityRows, new Function('x', 'return ' + 
                                                    expressionFromServer + ';'));
4

2 回答 2

2

According to Microsoft MSDN, Function object is supported in following document modes:

  • Quirks
  • Internet Explorer 6 standards
  • Internet Explorer 7 standards
  • Internet Explorer 8 standards
  • Internet Explorer 9 standards
  • Internet Explorer 10 standards
  • Internet Explorer 11 standards

Source: http://msdn.microsoft.com/en-us/library/ie/x844tc74(v=vs.94).aspx

于 2013-07-08T12:12:34.333 回答
1

new Function构造函数的操作在ECMAScript 第一版中指定,并由所有支持任何级别 JS 的浏览器实现。

于 2013-07-08T12:37:56.460 回答