This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Removed in: https://github.com/whatwg/dom/commit/8f73159d4a9e2e1a002f4eb1dfd4df3f645e9575 Used in: http://w3c.github.io/IndexedDB/#widl-IDBDatabase-objectStoreNames http://w3c.github.io/IndexedDB/#widl-IDBObjectStore-indexNames
We unfortunately appear to have a non-trivial number of uses of the "contains" operation on DOMStringList in Chrome. https://www.chromestatus.com/metrics/feature/popularity#DOMStringListContains ... shows around 0.01% of page loads (!). It's high enough that I don't think we can simply remove it without going through a deprecation phase and evangelizing. Given the nature of its use w/ IndexedDB (schema introspection) a usage even that high seems likely to be due to usage in a library. On the other hand, I don't think Firefox ever shipped it?
If Array.prototype.contains existed, that would solve the problem, I guess?
Array.prototype.contains at one point existed in ES6, but was renamed to Array.prototype.includes [1] because it wasn't web-compatible [2]. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1070767#c1 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1075059
Thanks Mike. I can't find Array.prototype.includes in the ES6 draft <https://people.mozilla.org/~jorendorff/es6-draft.html>, just String.prototype.includes. I see that Firefox Nightly has it though. This is all very unfortunate, getting rid of DOMStringList is going to be harder now.
(In reply to Philip Jägenstedt from comment #4) > Thanks Mike. I can't find Array.prototype.includes in the ES6 draft It didn't make it into ES6. It's an ES7 proposal: https://github.com/tc39/Array.prototype.includes
*** Bug 16103 has been marked as a duplicate of this bug. ***
Moved to https://github.com/w3c/IndexedDB/issues/28