mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibJS: Implement Iterator.from and the WrapForValidIteratorPrototype
Iterator.from creates an Iterator from either an existing iterator or an iterator-like object. In the latter case, it sets the prototype of the returned iterator to WrapForValidIteratorPrototype to wrap around the iterator-like object's iteration methods.
This commit is contained in:
parent
5736b53013
commit
d9d245faa7
11 changed files with 299 additions and 0 deletions
|
@ -35,4 +35,7 @@ private:
|
|||
IteratorRecord m_iterated; // [[Iterated]]
|
||||
};
|
||||
|
||||
ThrowCompletionOr<IteratorRecord> get_iterator_direct(VM&, Object&);
|
||||
ThrowCompletionOr<IteratorRecord> get_iterator_flattenable(VM&, Value);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue