LibJS: Set configurable toStringTag property for console

This commit is contained in:
Gasim Gasimzada 2024-08-08 21:30:34 +02:00 committed by Tim Ledbetter
commit c5b8e75204
Notes: github-actions[bot] 2024-08-11 19:07:22 +00:00
3 changed files with 11 additions and 0 deletions

View file

@ -50,6 +50,8 @@ void ConsoleObject::initialize(Realm& realm)
define_native_function(realm, vm.names.time, time, 0, attr);
define_native_function(realm, vm.names.timeLog, time_log, 0, attr);
define_native_function(realm, vm.names.timeEnd, time_end, 0, attr);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, "console"_string), Attribute::Configurable);
}
// 1.1.1. assert(condition, ...data), https://console.spec.whatwg.org/#assert