2020-04-07 00:51:16 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Jack Karamanian <karamanian.jack@gmail.com>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-04-07 00:51:16 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
|
|
namespace JS {
|
2020-04-07 12:00:44 -03:00
|
|
|
|
2020-04-07 00:51:16 -03:00
|
|
|
class BooleanConstructor final : public NativeFunction {
|
2020-06-21 10:14:02 -03:00
|
|
|
JS_OBJECT(BooleanConstructor, NativeFunction);
|
|
|
|
|
|
2020-04-07 00:51:16 -03:00
|
|
|
public:
|
2020-06-20 10:40:48 -03:00
|
|
|
explicit BooleanConstructor(GlobalObject&);
|
2020-07-22 12:50:18 -03:00
|
|
|
virtual void initialize(GlobalObject&) override;
|
2020-04-07 00:51:16 -03:00
|
|
|
virtual ~BooleanConstructor() override;
|
|
|
|
|
|
2020-09-27 12:24:14 -03:00
|
|
|
virtual Value call() override;
|
2021-06-27 16:48:34 -03:00
|
|
|
virtual Value construct(FunctionObject& new_target) override;
|
2020-04-07 00:51:16 -03:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
|
};
|
2020-04-07 12:00:44 -03:00
|
|
|
|
2020-04-07 00:51:16 -03:00
|
|
|
}
|