mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00: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
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/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…
Reference in a new issue