2021-09-05 23:05:16 -04:00
|
|
|
/*
|
2022-01-31 13:07:22 -05:00
|
|
|
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
2021-09-05 23:05:16 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
namespace JS::Intl {
|
|
|
|
|
2025-06-28 21:39:13 -07:00
|
|
|
class JS_API ListFormatConstructor final : public NativeFunction {
|
2021-09-05 23:05:16 -04:00
|
|
|
JS_OBJECT(ListFormatConstructor, NativeFunction);
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DECLARE_ALLOCATOR(ListFormatConstructor);
|
2021-09-05 23:05:16 -04:00
|
|
|
|
|
|
|
public:
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(Realm&) override;
|
2021-09-05 23:05:16 -04:00
|
|
|
virtual ~ListFormatConstructor() override = default;
|
|
|
|
|
2021-10-20 21:16:30 +01:00
|
|
|
virtual ThrowCompletionOr<Value> call() override;
|
2024-11-15 04:01:23 +13:00
|
|
|
virtual ThrowCompletionOr<GC::Ref<Object>> construct(FunctionObject& new_target) override;
|
2021-09-05 23:05:16 -04:00
|
|
|
|
|
|
|
private:
|
2022-08-28 23:51:28 +02:00
|
|
|
explicit ListFormatConstructor(Realm&);
|
|
|
|
|
2021-09-05 23:05:16 -04:00
|
|
|
virtual bool has_constructor() const override { return true; }
|
2021-09-06 09:00:06 -04:00
|
|
|
|
2021-10-22 22:49:07 +01:00
|
|
|
JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
|
2021-09-05 23:05:16 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|