mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibJS: Add Object::invoke()
This commit is contained in:
parent
5c6323c130
commit
9755f8d297
Notes:
sideshowbarker
2024-07-19 05:59:56 +09:00
Author: https://github.com/linusg
Commit: 9755f8d297
Pull-request: https://github.com/SerenityOS/serenity/pull/2431
Reviewed-by: https://github.com/awesomekling ✅
2 changed files with 16 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Runtime/Cell.h>
|
||||
#include <LibJS/Runtime/IndexedProperties.h>
|
||||
#include <LibJS/Runtime/MarkedValueList.h>
|
||||
#include <LibJS/Runtime/PrimitiveString.h>
|
||||
#include <LibJS/Runtime/PropertyName.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
|
@ -107,6 +108,8 @@ public:
|
|||
IndexedProperties& indexed_properties() { return m_indexed_properties; }
|
||||
void set_indexed_property_elements(Vector<Value>&& values) { m_indexed_properties = IndexedProperties(move(values)); }
|
||||
|
||||
Value invoke(const FlyString& property_name, Optional<MarkedValueList> arguments = {}) const;
|
||||
|
||||
private:
|
||||
virtual Value get_by_index(u32 property_index) const;
|
||||
virtual bool put_by_index(u32 property_index, Value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue