-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMStringList has been removed from DOM #28
Comments
Latest stats:
I guess the next step would be to try implementing the equivalent of FrozenArrayWithContains<> - an array subclass with contains() added which is frozen - ship it, see if it sticks, and then push that into WebIDL. |
item on Location does not look promising. If DOMStringList cannot be purged entirely from the platform, is it worthwhile trying to get rid of it from IndexedDB alone? Given what location.ancestorOrigins is for, it is plausible that almost all of the usage comes from a single origin, so if one could fine out what it is it might be possible to drive down the usage of that enough to eliminate DOMStringList. |
We should do an HTTPArchive search; I did one for .contains() and there were many different libraries using it. I did not do one for items but that's possible. |
I think there are definitely advantages to returning "real" Array objects over "array like" DOM objects. It's nice to be able to use any of the Array functions that developers are familiar with. |
FWIW: 409 hits in HTTPArchive (Alexa Top 10,000, feb 1 2016 crawl) for "ancestorOrigins.item". Just eyeballing the results, unique scripts from liverail.com (249), ad-srv.net (30), redintelligence.net (12) are a big chunk, and then with a variety of script URLs: doubleclick.net (22), googlesyndication.com(13) performgroup.com (11), facebook.com (7) and lots of one-offs. |
Hmm, so it's not just one or two big users. Maybe a FrozenArrayWithItem<>? |
Yeah, as @sicking has said in the past I think I don't know what that entails implementation-wise in Blink, and I haven't thought at all about what other questions this raises (is the subclass's constructor exposed on the global? is |
Yeah, seems worth trying. It would probably be web compatible to just have normal arrays (not subclasses) where |
For the spec for now (especially for "2.0") I'm tempted to just define DOMStringList in the IDB spec so it does have a definition, and add a note to implementers encouraging experimenting with returning real arrays with Given that this is shipping in all major browsers and the usage remains high, pretending it doesn't exist in lieu of a documented, shipping alternative is not helpful. (But I don't want to discourage anyone from pursuing |
We can rip it out, but as a straw man I added a definition. I'll keep this issue open, though. |
In httparchive:
3,558 rows. All of the matches are GitHub search: https://github.com/search?l=JavaScript&q="objectStoreNames.contains"+NOT+test&ref=searchresults&type=Code&utf8=✓ https://github.com/search?l=JavaScript&q="indexNames.contains"+NOT+test&ref=searchresults&type=Code&utf8=✓ |
whatwg/html#2192 moves DOMStringList into HTML. |
... and it's landed, so this turns into "Remove DOMStringList definition from IndexedDB" |
Imported from https://www.w3.org/Bugs/Public/show_bug.cgi?id=28067
Relevant bits:
FrozenArray<>
which is what newfangled specs would usecontains
,item
, both or neither - on each usage of DOMStringListFrozenArrayWithContains<>
The text was updated successfully, but these errors were encountered: