Object.defineProperty在IE8中不起作用

时间:2014-09-20 16:17:03

标签: javascript

我正在研究一种JSON查询语言,该项目在IE8以外的所有浏览器中都能正常运行。

我在IE8中收到Object doesn't support this action

Object.defineProperty(FJQL, c, {
  get: function(){
    return (new Query(this, this.records))[c];
  }
});

有没有替代解决方案?

...谢谢

1 个答案:

答案 0 :(得分:1)

IE8 does not support getter/setter functions on properties of non DOM objects.

所以在这里你需要使用完整的getter函数

请查看here。它会给你答案。:)

相关问题