mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-26 19:32:06 -05:00
LibWeb: Add @@toStringTag own property on wrappers
This makes wrappers stringify to the expected "[object InterfaceName]" instead of just "[object Object]".
This commit is contained in:
parent
427beb97b5
commit
ab4c73746c
1 changed files with 3 additions and 0 deletions
|
@ -1694,6 +1694,9 @@ namespace Web::Bindings {
|
|||
void @wrapper_class@::initialize(JS::GlobalObject& global_object)
|
||||
{
|
||||
@wrapper_base_class@::initialize(global_object);
|
||||
|
||||
auto& vm = global_object.vm();
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), JS::js_string(vm, "@name@"), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
@wrapper_class@::~@wrapper_class@()
|
||||
|
|
Loading…
Add table
Reference in a new issue