1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibJS: Add the Set built-in object

This commit is contained in:
Idan Horowitz 2021-06-09 00:08:47 +03:00 committed by Linus Groh
parent b17a282b4b
commit 670be04c81
15 changed files with 359 additions and 30 deletions

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/NativeFunction.h>
namespace JS {
class SetConstructor final : public NativeFunction {
JS_OBJECT(SetConstructor, NativeFunction);
public:
explicit SetConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~SetConstructor() override;
virtual Value call() override;
virtual Value construct(Function&) override;
private:
virtual bool has_constructor() const override { return true; }
JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
};
}