
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/
23 lines
459 B
C++
23 lines
459 B
C++
/*
|
|
* 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);
|
|
}
|
|
|
|
}
|