-
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
transaction should either take DOMStringList or DOMStringList needs to be iterable #85
Comments
In the past I think this was covered by WebIDL accepting anything with length and indexed properties for sequence arguments, which DOMStringList satisfied. I believe that changed? Anyway, @rniwa is correct about the use case and I think Blink even has tests for this. (I'm on my phone at the moment.) so we should fix in spec-land somehow, either making DOMStringList iterable or changing the method. |
@aliams, @wanderview - do you have a preference between:
The former is more consistent with other platform types and with our eventual hope to replace it with The latter is a more scoped change. I'm pretty sure Blink internally still checks for length and indexed properties, as previously specified in WebIDL, but either approach is likely to be web-compatible. |
@beidson too - same question as previous comment. |
Considering the goal to eventually remove |
Yeah, making DOMStringList iterable seems like the way to go, even if we have to keep it. |
My preference would be to fix this as a follow-up commit to whatwg/html#2192 with corresponding WPT changes. |
sgtm. I have a blink CL I haven't landed because I didn't want to have the "it's a deprecated API we're trying to remove, why are we adding to it?" fight. |
Spec-wise, we should decide on what to "domintro" for iterable<>. I notice that DOMTokenList's docs don't mention the methods that get bolted on. |
Hmm good point. domintro should probably mention all. I wonder if we can get some domintro automation into bikeshed to make things a little less tedious. |
Turns out this is moot. Per WebIDL
TIL Blink and Gecko already implement this. Wheee! Blink tosses DOMStringList into the union but that's an implementation detail - the spec is fine. |
I think adding |
Agreed. I have a local patch for Blink; if it appeared in the spec I'd go through our "intent" process to ship it, but not a priority to push for it. |
https://bugs.webkit.org/show_bug.cgi?id=231997 Reviewed by Chris Dumez. DOMStringList is also iterable in WebKit now, so we don't need to keep this definition for compatibility (see w3c/IndexedDB#85 (comment)). Covered by existing test storage/indexeddb/transaction-basics.html, which verifies that DOMStringList can be argument for IDBDatabase.transaction(). * Modules/indexeddb/IDBDatabase.idl: Canonical link: https://commits.webkit.org/243292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=231997 Reviewed by Chris Dumez. DOMStringList is also iterable in WebKit now, so we don't need to keep this definition for compatibility (see w3c/IndexedDB#85 (comment)). Covered by existing test storage/indexeddb/transaction-basics.html, which verifies that DOMStringList can be argument for IDBDatabase.transaction(). * Modules/indexeddb/IDBDatabase.idl: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@284550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
transaction
method onIDBDatabase
takes aDOMString
or asequence<DOMString>
butDOMStringList
is not iterable.The consequence of this is that, you can’t call
transaction()
with the return value ofobjectStoreNames
method. This is not Web incompatible as far as I know.The text was updated successfully, but these errors were encountered: