mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibJS: Add a mechanism for callback-based object properties
This patch adds NativeProperty, which can be used to implement object properties that have C++ getters and/or setters. Use this to move String.prototype.length to its correct place. :^)
This commit is contained in:
parent
bb57bc1b42
commit
3163929990
Notes:
sideshowbarker
2024-07-19 08:17:28 +09:00
Author: https://github.com/awesomekling
Commit: 3163929990
7 changed files with 125 additions and 2 deletions
|
@ -37,7 +37,6 @@ StringObject::StringObject(PrimitiveString* string)
|
|||
: m_string(string)
|
||||
{
|
||||
set_prototype(interpreter().string_prototype());
|
||||
put("length", Value(static_cast<i32>(m_string->string().length())));
|
||||
}
|
||||
|
||||
StringObject::~StringObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue