2021-09-06 22:18:48 -04:00
|
|
|
/*
|
2022-01-31 13:07:22 -05:00
|
|
|
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
|
2021-09-06 22:18:48 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
namespace JS::Intl {
|
|
|
|
|
|
|
|
class CollatorConstructor final : public NativeFunction {
|
|
|
|
JS_OBJECT(CollatorConstructor, NativeFunction);
|
|
|
|
|
|
|
|
public:
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual ThrowCompletionOr<void> initialize(Realm&) override;
|
2021-09-06 22:18:48 -04:00
|
|
|
virtual ~CollatorConstructor() override = default;
|
|
|
|
|
|
|
|
virtual ThrowCompletionOr<Value> call() override;
|
2022-12-14 19:18:10 +00:00
|
|
|
virtual ThrowCompletionOr<NonnullGCPtr<Object>> construct(FunctionObject& new_target) override;
|
2021-09-06 22:18:48 -04:00
|
|
|
|
|
|
|
private:
|
2022-08-28 23:51:28 +02:00
|
|
|
explicit CollatorConstructor(Realm&);
|
|
|
|
|
2021-09-06 22:18:48 -04:00
|
|
|
virtual bool has_constructor() const override { return true; }
|
2021-09-08 13:32:19 -04:00
|
|
|
|
|
|
|
JS_DECLARE_NATIVE_FUNCTION(supported_locales_of);
|
2021-09-06 22:18:48 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|