【问题标题】:Object.defineProperty is not working in IE8 [duplicate]Object.defineProperty 在 IE8 中不起作用 [重复]
【发布时间】:2014-09-20 16:17:02
【问题描述】:

我正在开发一种 JSON 查询语言,该项目在除 IE8 之外的所有浏览器中都能正常工作。

我在 IE8 中得到了这个Object doesn't support this action

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

有没有其他解决方案?

谢谢....

【问题讨论】:

标签: javascript


【解决方案1】:

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

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

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

【讨论】:

  • 请下次投票/将问题标记为重复,而不是发布“答案”。
猜你喜欢
  • 2013-04-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-26
相关资源
最近更新 更多