mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibWeb: Return null if an unknown canvas context type is requested
This commit is contained in:
parent
7f1677d574
commit
95f393ebcd
1 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,8 @@ RefPtr<Layout::Node> HTMLCanvasElement::create_layout_node()
|
|||
|
||||
CanvasRenderingContext2D* HTMLCanvasElement::get_context(String type)
|
||||
{
|
||||
VERIFY(type == "2d");
|
||||
if (type != "2d")
|
||||
return nullptr;
|
||||
if (!m_context)
|
||||
m_context = CanvasRenderingContext2D::create(*this);
|
||||
return m_context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue