mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibJS: Add @@toStringTag to Reflect
This commit is contained in:
parent
b377777208
commit
6c256bb400
2 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,7 @@ void ReflectObject::initialize(GlobalObject& global_object)
|
||||||
define_native_function(vm.names.preventExtensions, prevent_extensions, 1, attr);
|
define_native_function(vm.names.preventExtensions, prevent_extensions, 1, attr);
|
||||||
define_native_function(vm.names.set, set, 3, attr);
|
define_native_function(vm.names.set, set, 3, attr);
|
||||||
define_native_function(vm.names.setPrototypeOf, set_prototype_of, 2, attr);
|
define_native_function(vm.names.setPrototypeOf, set_prototype_of, 2, attr);
|
||||||
|
Object::define_property(vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Reflect"), Attribute::Configurable);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReflectObject::~ReflectObject()
|
ReflectObject::~ReflectObject()
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
test("basic functionality", () => {
|
||||||
|
expect(Reflect[Symbol.toStringTag]).toBe("Reflect");
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue