1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibWeb: Make HTML::ImageRequest GC allocated

This commit is contained in:
Aliaksandr Kalenik 2023-08-18 12:56:21 +02:00 committed by Andreas Kling
parent 333949894e
commit bbfedf2e5a
4 changed files with 27 additions and 15 deletions

View file

@ -17,9 +17,12 @@
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/images.html#image-request
class ImageRequest : public RefCounted<ImageRequest> {
class ImageRequest final : public JS::Cell {
JS_CELL(ImageRequest, JS::Cell);
public:
static ErrorOr<NonnullRefPtr<ImageRequest>> create(Page&);
[[nodiscard]] static JS::NonnullGCPtr<ImageRequest> create(JS::Realm&, Page&);
~ImageRequest();
// https://html.spec.whatwg.org/multipage/images.html#img-req-state