mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibJS: Add the Intl namespace object :^)
This is the start of implementing ECMA-402 in LibJS, better known as the ECMAScript Internationalization API. Much like Temporal this gets its own subdirectory (Runtime/Intl/) as well as a new C++ namespace (JS::Intl) so we don't have to prefix all the files and classes with "Intl". https://tc39.es/ecma402/
This commit is contained in:
parent
7d8c182359
commit
a37dcf8ca7
5 changed files with 49 additions and 0 deletions
23
Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp
Normal file
23
Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Intl/Intl.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
// 8 The Intl Object, https://tc39.es/ecma402/#intl-object
|
||||
Intl::Intl(GlobalObject& global_object)
|
||||
: Object(*global_object.object_prototype())
|
||||
{
|
||||
}
|
||||
|
||||
void Intl::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue