mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 12:07:35 +00:00
LibJS: Add a global "Object" constructor
This patch adds an "Object" constructor to the global object. The only function it implements so far is Object.getPrototypeOf().
This commit is contained in:
parent
a3d92b1210
commit
14047ca432
9 changed files with 134 additions and 3 deletions
|
@ -31,13 +31,16 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
class NativeFunction final : public Function {
|
||||
class NativeFunction : public Function {
|
||||
public:
|
||||
explicit NativeFunction(AK::Function<Value(Object*, const Vector<Value>&)>);
|
||||
virtual ~NativeFunction() override;
|
||||
|
||||
virtual Value call(Interpreter&, const Vector<Value>&) override;
|
||||
|
||||
protected:
|
||||
NativeFunction() {}
|
||||
|
||||
private:
|
||||
virtual bool is_native_function() const override { return true; }
|
||||
virtual const char* class_name() const override { return "NativeFunction"; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue