mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
LibJS: Add a constructor to create an Intl.Locale object from a LocaleID
This commit is contained in:
parent
3abfe7f7db
commit
03d7f01e0c
2 changed files with 46 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
#include <LibUnicode/Forward.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
|
@ -17,7 +18,10 @@ class Locale final : public Object {
|
|||
JS_OBJECT(Locale, Object);
|
||||
|
||||
public:
|
||||
static Locale* create(GlobalObject&, Unicode::LocaleID const&);
|
||||
|
||||
Locale(Object& prototype);
|
||||
Locale(Unicode::LocaleID const&, Object& prototype);
|
||||
virtual ~Locale() override = default;
|
||||
|
||||
String const& locale() const { return m_locale; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue