mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibJS: Add @@toStringTag to Promise.prototype
This commit is contained in:
parent
ed64a69fb2
commit
b377777208
Notes:
sideshowbarker
2024-07-18 12:36:37 +09:00
2 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@ void PromisePrototype::initialize(GlobalObject& global_object)
|
|||
define_native_function(vm.names.then, then, 2, attr);
|
||||
define_native_function(vm.names.catch_, catch_, 1, attr);
|
||||
define_native_function(vm.names.finally, finally, 1, attr);
|
||||
define_property(vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Promise"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
static Promise* promise_from(VM& vm, GlobalObject& global_object)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Promise.prototype[Symbol.toStringTag]).toBe("Promise");
|
||||
});
|
Loading…
Reference in a new issue