1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:38:12 +00:00

LibJS: Add Object::invoke()

This commit is contained in:
Linus Groh 2020-05-28 19:12:34 +01:00 committed by Andreas Kling
parent 5c6323c130
commit 9755f8d297
2 changed files with 16 additions and 0 deletions

View file

@ -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);