/* * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace JS { class Array : public Object { JS_OBJECT(Array, Object); public: static Array* create(GlobalObject&); static Array* create_from(GlobalObject&, const Vector&); explicit Array(Object& prototype); virtual void initialize(GlobalObject&) override; virtual ~Array() override; static Array* typed_this(VM&, GlobalObject&); private: virtual bool is_array() const override { return true; } JS_DECLARE_NATIVE_GETTER(length_getter); JS_DECLARE_NATIVE_SETTER(length_setter); }; }