Skip to content

Comments

fix: spec compliant iterator#631

Open
richarddd wants to merge 3 commits intoDelSkayn:masterfrom
richarddd:fix/spec-compliant-iterator
Open

fix: spec compliant iterator#631
richarddd wants to merge 3 commits intoDelSkayn:masterfrom
richarddd:fix/spec-compliant-iterator

Conversation

@richarddd
Copy link
Collaborator

Description of changes

Iterators produced by Iterable now have the correct prototype chain through IteratorPrototype, with next as enumerable/writable/configurable and [Symbol.iterator]() returning this. Added Iterable::from_fn for closure-based iterators that can reference live data, which is needed for Web API methods like Headers.keys(). Removed the old two-level iterable/iterator indirection. Iterable now produces an iterator object directly.

Checklist

  • Added change to the changelog
  • Created unit tests for my feature if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants