来自 IDBKeyRange.includes 的令人困惑的行为
Confusing behavior from IDBKeyRange.includes
Firefox 47 应该支持 IDBKeyRange
的 includes
方法,但我很难理解为什么它会给出它给出的结果。
// 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
我在这里错过了什么?
这似乎是 Firefox 中的错误。我会提请开发人员注意。
我还提交了一个拉取请求以扩展浏览器使用的测试,并验证了 Chrome 中的行为是正确的:
https://github.com/w3c/web-platform-tests/pull/3216
...
Mozilla 错误:https://bugzilla.mozilla.org/show_bug.cgi?id=1281377
Firefox 47 应该支持 IDBKeyRange
的 includes
方法,但我很难理解为什么它会给出它给出的结果。
// 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
我在这里错过了什么?
这似乎是 Firefox 中的错误。我会提请开发人员注意。
我还提交了一个拉取请求以扩展浏览器使用的测试,并验证了 Chrome 中的行为是正确的:
https://github.com/w3c/web-platform-tests/pull/3216
...
Mozilla 错误:https://bugzilla.mozilla.org/show_bug.cgi?id=1281377