【问题标题】:Confusing behavior from IDBKeyRange.includesIDBKeyRange.includes 的令人困惑的行为
【发布时间】:2016-06-13 01:05:00
【问题描述】:

Firefox 47 应该支持 IDBKeyRangeincludes 方法,但我很难理解为什么它会给出它给出的结果。

// These work as I'd expect to return false
console.log(IDBKeyRange.lowerBound(2).includes(1));
console.log(IDBKeyRange.lowerBound(4).includes(3));

// These do not behave as expected (I'd expect "true")
console.log(IDBKeyRange.lowerBound(1).includes(1)); // FF gives false
console.log(IDBKeyRange.lowerBound(3).includes(4)); // FF gives false

我在这里错过了什么?

【问题讨论】:

    标签: javascript firefox indexeddb


    【解决方案1】:

    这似乎是 Firefox 中的一个错误。我会提请开发人员注意的。

    我还提交了拉取请求以扩展浏览器使用的测试,并验证了 Chrome 中的行为是正确的:

    https://github.com/w3c/web-platform-tests/pull/3216

    ...

    Mozilla 错误:https://bugzilla.mozilla.org/show_bug.cgi?id=1281377

    【讨论】:

    • 感谢您对此的帮助和行动。我还刚刚在 github.com/w3c/web-platform-tests/issues/3218 添加了一个问题,要求进行基于节点的测试,以便我们这些从事支持节点的 polyfill 工作的人可以开箱即用地获得相同的好处(无需特殊的抓取或配置)。跨度>
    猜你喜欢
    • 2011-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多