2021-03-20 05:22:27 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-03-20 05:22:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::Bindings {
|
|
|
|
|
|
|
|
|
|
class ImageConstructor final : public JS::NativeFunction {
|
|
|
|
|
public:
|
|
|
|
|
explicit ImageConstructor(JS::GlobalObject&);
|
|
|
|
|
virtual void initialize(JS::GlobalObject&) override;
|
|
|
|
|
virtual ~ImageConstructor() override;
|
|
|
|
|
|
2021-10-20 21:16:30 +01:00
|
|
|
virtual JS::ThrowCompletionOr<JS::Value> call() override;
|
|
|
|
|
virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override;
|
2021-03-20 05:22:27 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
|
virtual const char* class_name() const override { return "ImageConstructor"; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|