Re: [whatwg/url] Does URLSearchParams.prototype.keys() return an Iterator or IterableIterator? (#521)

The prototype of the returned iterator object is the [iterator prototype object](https://heycam.github.io/webidl/#dfn-iterator-prototype-object) of the interface, which has as prototype [%IteratorPrototype%](https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object) defined in ECMAScript. There, you'll find that %IteratorPrototype% has a single method defined: `@@iterator`. So the result of `keys()` should indeed be iterable.

The code you posted works in Firefox for me here (76.0.1):
![image](https://user-images.githubusercontent.com/1538624/82282427-cb4e3880-9961-11ea-8cc9-55d5d4332517.png)

In any case, any issue would be an implementation one as the spec is clear.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/521#issuecomment-630561752

Received on Tuesday, 19 May 2020 03:47:32 UTC