mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibJS: Implement AggregateError
This commit is contained in:
parent
2f03eb8628
commit
cbd7437d40
Notes:
sideshowbarker
2024-07-18 12:25:26 +09:00
Author: https://github.com/linusg
Commit: cbd7437d40
Pull-request: https://github.com/SerenityOS/serenity/pull/7999
13 changed files with 301 additions and 15 deletions
28
Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h
Normal file
28
Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class AggregateErrorConstructor final : public NativeFunction {
|
||||
JS_OBJECT(AggregateErrorConstructor, NativeFunction);
|
||||
|
||||
public:
|
||||
explicit AggregateErrorConstructor(GlobalObject&);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~AggregateErrorConstructor() override = default;
|
||||
|
||||
virtual Value call() override;
|
||||
virtual Value construct(Function& new_target) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue