Intl.cpp 685 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Runtime/GlobalObject.h>
  7. #include <LibJS/Runtime/Intl/Intl.h>
  8. namespace JS::Intl {
  9. // 8 The Intl Object, https://tc39.es/ecma402/#intl-object
  10. Intl::Intl(GlobalObject& global_object)
  11. : Object(*global_object.object_prototype())
  12. {
  13. }
  14. void Intl::initialize(GlobalObject& global_object)
  15. {
  16. Object::initialize(global_object);
  17. auto& vm = this->vm();
  18. // 8.1.1 Intl[ @@toStringTag ], https://tc39.es/ecma402/#sec-Intl-toStringTag
  19. define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl"), Attribute::Configurable);
  20. }
  21. }