ImageConstructor.h 682 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/NativeFunction.h>
  8. namespace Web::Bindings {
  9. class ImageConstructor final : public JS::NativeFunction {
  10. public:
  11. explicit ImageConstructor(JS::GlobalObject&);
  12. virtual void initialize(JS::GlobalObject&) override;
  13. virtual ~ImageConstructor() override;
  14. virtual JS::Value call() override;
  15. virtual JS::Value construct(JS::FunctionObject& new_target) override;
  16. private:
  17. virtual bool has_constructor() const override { return true; }
  18. virtual const char* class_name() const override { return "ImageConstructor"; }
  19. };
  20. }