mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:27:34 +00:00
LibJS: Start implementing Intl.Segmenter
This commit is contained in:
parent
88c5992e0b
commit
a3bc06bb23
13 changed files with 334 additions and 9 deletions
28
Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.h
Normal file
28
Userland/Libraries/LibJS/Runtime/Intl/SegmenterConstructor.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Idan Horowitz <idan.horowitz@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
class SegmenterConstructor final : public NativeFunction {
|
||||
JS_OBJECT(SegmenterConstructor, NativeFunction);
|
||||
|
||||
public:
|
||||
explicit SegmenterConstructor(GlobalObject&);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~SegmenterConstructor() override = default;
|
||||
|
||||
virtual ThrowCompletionOr<Value> call() override;
|
||||
virtual ThrowCompletionOr<Object*> construct(FunctionObject& new_target) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue