diff options
author | Linus Groh <mail@linusgroh.de> | 2021-06-11 18:06:20 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-06-11 18:49:50 +0100 |
commit | cbd7437d40c6d58c475938e45ffa4265dbbc5ac0 (patch) | |
tree | 26a977d1addf64c514bf42516def408ca4f12bcb /Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h | |
parent | 2f03eb8628dbb2d6c643c09309d92237dd0152fc (diff) | |
download | serenity-cbd7437d40c6d58c475938e45ffa4265dbbc5ac0.zip |
LibJS: Implement AggregateError
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h new file mode 100644 index 0000000000..8353ea3d84 --- /dev/null +++ b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.h @@ -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; } +}; + +} |