bzbarsky at MIT.EDU
Thu Mar 6 13:42:12 PST 2014
On 3/6/14 3:58 PM, Domenic Denicola wrote:
>> That would not allow us to kill DOMStringList.
> Can we get more background on DOMStringList?
Sure. It's used in the following places in Gecko, as far as I can tell:
2) Microdata API.
3) Various places in indexeddb.
4) The DataTransfer API.
5) Some sort of offline resource list API that's not part of any
standard I can find.
#1 is not implemented by anyone but Gecko, and the spec is claiming it's
a DOMString, which no on implements at all.
#2 is likewise not implemented by anyone but Gecko at this point, and
the spec likewise claims DOMString (which again no one implements).
For #3 I've heard Jonas claim he'd like to just moving ES arrays there.
#4 is specced as a DOMString, which again no one implements.
I don't know offhand what other UAs do for #3 and #4.
> It seems unlikely that you could get away with replacing a string-only type, which, from the specs I can find, seems to be immutable and have an additional index() method
DOMStringList in Gecko does not have an index() method. Did you mean
Whether it's OK to replace with a mutable and any-type-containing thing
is an interesting philosophical question. Some of the above use cases
may be OK with using a frozen array, for example, or not care if the
page changes it around, since the browser doesn't plan to use it itself.
But yes, it's not a priori obvious that one can replace the other.
> https://developer.mozilla.org/en-US/docs/Web/API/DOMStringList implies it's not implemented in Mozilla
That page was a bald-faced lie. Note the "in need of a technical
review" bit. ;) I've removed the completely bogus part for now.
More information about the es-discuss