1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00
serenity/Userland/Libraries/LibJS/Runtime/ObjectConstructor.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

47 lines
1.4 KiB
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2020-2021, Linus Groh <mail@linusgroh.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/NativeFunction.h>
namespace JS {
class ObjectConstructor final : public NativeFunction {
JS_OBJECT(ObjectConstructor, NativeFunction);
public:
explicit ObjectConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~ObjectConstructor() override;
virtual Value call() override;
virtual Value construct(Function& new_target) override;
private:
virtual bool has_constructor() const override { return true; }
JS_DECLARE_NATIVE_FUNCTION(define_property_);
JS_DECLARE_NATIVE_FUNCTION(define_properties);
JS_DECLARE_NATIVE_FUNCTION(is);
JS_DECLARE_NATIVE_FUNCTION(get_own_property_descriptor);
JS_DECLARE_NATIVE_FUNCTION(get_own_property_names);
JS_DECLARE_NATIVE_FUNCTION(get_prototype_of);
JS_DECLARE_NATIVE_FUNCTION(set_prototype_of);
JS_DECLARE_NATIVE_FUNCTION(is_extensible);
JS_DECLARE_NATIVE_FUNCTION(is_frozen);
JS_DECLARE_NATIVE_FUNCTION(is_sealed);
JS_DECLARE_NATIVE_FUNCTION(prevent_extensions);
JS_DECLARE_NATIVE_FUNCTION(seal);
JS_DECLARE_NATIVE_FUNCTION(freeze);
JS_DECLARE_NATIVE_FUNCTION(keys);
JS_DECLARE_NATIVE_FUNCTION(values);
JS_DECLARE_NATIVE_FUNCTION(entries);
JS_DECLARE_NATIVE_FUNCTION(create);
};
}