ListFormatConstructor.h 746 B

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