Skip to content
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

Add Headers iterators #295

Merged
merged 5 commits into from
Mar 13, 2016
Merged

Add Headers iterators #295

merged 5 commits into from
Mar 13, 2016

Conversation

dgraham
Copy link
Contributor

@dgraham dgraham commented Mar 12, 2016

Adds entries, keys, and values iterator functions to Headers. Each iterator, and Headers itself, is also iterable if the browser supports Symbol.iterator. The medikoo/es6-symbol polyfill may be used in browsers without Symbol.

Background:

Closes #292.

/cc @lukeapage @dkfiresky

@lukeapage
Copy link

Looks good to me, thanks for adding this. Do you think entries, values, keys will be added to the spec at some point?

dgraham added a commit that referenced this pull request Mar 13, 2016
@dgraham dgraham merged commit 57b7f98 into master Mar 13, 2016
@dgraham dgraham deleted the iterators branch March 13, 2016 16:13
@dgraham
Copy link
Contributor Author

dgraham commented Mar 13, 2016

Do you think entries, values, keys will be added to the spec at some point?

It's a little confusing, but the iterator functions are actually specified by fetch. The Headers class implements the iterable interface, which is defined in a separate specification. All specs are linked in the initial comment above.

@lukeapage
Copy link

lukeapage commented Mar 13, 2016 via email

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting all headers, mismatch between the specs and polyfill and implementations
2 participants