mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +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
Notes:
sideshowbarker
2024-07-18 03:35:30 +09:00
Author: https://github.com/trflynn89
Commit: d9d245faa7
Pull-request: https://github.com/SerenityOS/serenity/pull/19642
11 changed files with 299 additions and 0 deletions
|
@ -24,6 +24,8 @@ private:
|
|||
explicit IteratorConstructor(Realm&);
|
||||
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
|
||||
JS_DECLARE_NATIVE_FUNCTION(from);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue