mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibJS: Add "name" property to functions
This commit is contained in:
parent
d007e8d00f
commit
99be27b4a1
16 changed files with 118 additions and 16 deletions
|
@ -397,6 +397,7 @@ bool Object::put_native_function(const FlyString& property_name, AK::Function<Va
|
|||
{
|
||||
auto* function = NativeFunction::create(interpreter(), interpreter().global_object(), property_name, move(native_function));
|
||||
function->put("length", Value(length), Attribute::Configurable);
|
||||
function->put("name", js_string(heap(), property_name), Attribute::Configurable);
|
||||
return put(property_name, function, attributes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue