mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibJS: Implement ShadowRealm.prototype[@@toStringTag]
This commit is contained in:
parent
d40331ef69
commit
b0ee7f38d0
2 changed files with 7 additions and 0 deletions
|
@ -17,7 +17,11 @@ ShadowRealmPrototype::ShadowRealmPrototype(GlobalObject& global_object)
|
|||
|
||||
void ShadowRealmPrototype::initialize(GlobalObject& global_object)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
Object::initialize(global_object);
|
||||
|
||||
// 3.4.3 ShadowRealm.prototype [ @@toStringTag ], https://tc39.es/proposal-shadowrealm/#sec-shadowrealm.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.ShadowRealm.as_string()), Attribute::Configurable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(ShadowRealm.prototype[Symbol.toStringTag]).toBe("ShadowRealm");
|
||||
});
|
Loading…
Add table
Reference in a new issue