mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibJS: Implement Promise.any on the Promise constructor
This commit is contained in:
parent
98d8a858cd
commit
4dffa40a8d
Notes:
sideshowbarker
2024-07-18 05:22:09 +09:00
Author: https://github.com/trflynn89
Commit: 4dffa40a8d
Pull-request: https://github.com/SerenityOS/serenity/pull/9562
Reviewed-by: https://github.com/linusg ✅
4 changed files with 243 additions and 2 deletions
|
@ -74,4 +74,18 @@ private:
|
|||
virtual Value resolve_element() override;
|
||||
};
|
||||
|
||||
// 27.2.4.3.2 Promise.any Reject Element Functions, https://tc39.es/ecma262/#sec-promise.any-reject-element-functions
|
||||
class PromiseAnyRejectElementFunction final : public PromiseResolvingElementFunction {
|
||||
JS_OBJECT(PromiseResolvingFunction, NativeFunction);
|
||||
|
||||
public:
|
||||
static PromiseAnyRejectElementFunction* create(GlobalObject&, size_t, PromiseValueList&, PromiseCapability, RemainingElements&);
|
||||
|
||||
explicit PromiseAnyRejectElementFunction(size_t, PromiseValueList&, PromiseCapability, RemainingElements&, Object& prototype);
|
||||
virtual ~PromiseAnyRejectElementFunction() override = default;
|
||||
|
||||
private:
|
||||
virtual Value resolve_element() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue