LibWeb: Add CanvasRenderingContext2D context attribute parsing

Makes `context.getContextAttributes()` work.
This commit is contained in:
Jelle Raaijmakers 2025-04-28 16:01:47 +02:00
commit fac0f82031
Notes: github-actions[bot] 2025-04-29 11:52:34 +00:00
6 changed files with 81 additions and 17 deletions

View file

@ -6,7 +6,6 @@
#pragma once
#include <AK/ByteBuffer.h>
#include <LibGfx/Forward.h>
#include <LibGfx/PaintingSurface.h>
#include <LibWeb/HTML/HTMLElement.h>
@ -30,7 +29,7 @@ public:
No,
Yes,
};
HasOrCreatedContext create_2d_context();
JS::ThrowCompletionOr<HasOrCreatedContext> create_2d_context(JS::Value options);
WebIDL::UnsignedLong width() const;
WebIDL::UnsignedLong height() const;