SetConstructor.h 709 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/NativeFunction.h>
  8. namespace JS {
  9. class SetConstructor final : public NativeFunction {
  10. JS_OBJECT(SetConstructor, NativeFunction);
  11. public:
  12. explicit SetConstructor(GlobalObject&);
  13. virtual void initialize(GlobalObject&) override;
  14. virtual ~SetConstructor() override;
  15. virtual ThrowCompletionOr<Value> call() override;
  16. virtual ThrowCompletionOr<Object*> construct(FunctionObject&) override;
  17. private:
  18. virtual bool has_constructor() const override { return true; }
  19. JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
  20. };
  21. }