/src/serenity/Userland/Libraries/LibWeb/Bindings/ImageConstructor.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2021, the SerenityOS developers. |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <AK/StringView.h> |
10 | | #include <LibJS/Runtime/NativeFunction.h> |
11 | | |
12 | | namespace Web::Bindings { |
13 | | |
14 | | class ImageConstructor final : public JS::NativeFunction { |
15 | | JS_OBJECT(ImageConstructor, JS::NativeFunction); |
16 | | JS_DECLARE_ALLOCATOR(ImageConstructor); |
17 | | |
18 | | public: |
19 | | explicit ImageConstructor(JS::Realm&); |
20 | | virtual void initialize(JS::Realm&) override; |
21 | | virtual ~ImageConstructor() override = default; |
22 | | |
23 | | virtual JS::ThrowCompletionOr<JS::Value> call() override; |
24 | | virtual JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> construct(JS::FunctionObject& new_target) override; |
25 | | |
26 | | private: |
27 | 0 | virtual bool has_constructor() const override { return true; } |
28 | | }; |
29 | | |
30 | | } |