Skip to content

Truly independent web browser

573 B
Raw Blame
/*
 * Copyright (c) 2020, Andreas Kling <[email protected]>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibJS/Export.h>
#include <LibJS/Runtime/Object.h>

namespace JS {

// Number.prototype is a NumberObject too, as it has a [[NumberData]] internal slot.
class JS_API NumberObject : public Object {
public:
    static GC::Ref<NumberObject> create(Realm&, double);

    double number() const;

    static bool is_engine_class_of(Object const& object) { return object.is_of_engine_class_or_subclass(JS_LAYOUT_CLASS_ID_NUMBER_OBJECT); }
};

}