mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 05:07:35 +00:00
LibJS: Remove String.prototype.length
A string's length property is supposed to be a regular non-writable, non-enumerable, non-configurable property on the StringObject instead.
This commit is contained in:
parent
fc2673d111
commit
8d7ec28924
Notes:
sideshowbarker
2024-07-18 12:45:20 +09:00
Author: https://github.com/linusg
Commit: 8d7ec28924
Pull-request: https://github.com/SerenityOS/serenity/pull/7846
5 changed files with 11 additions and 12 deletions
|
@ -62,6 +62,7 @@ describe("normal behavior", () => {
|
|||
});
|
||||
|
||||
test("native getter function", () => {
|
||||
expect(Reflect.get(String.prototype, "length", "foo")).toBe(3);
|
||||
const typedArray = new Uint8Array(3);
|
||||
expect(Reflect.get(Uint8Array.prototype, "length", typedArray)).toBe(3);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue