1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb: Add the MathML Element

This patch introduces the MathML element, which provides the interface
all MathML elements are built from.
This commit is contained in:
Jonah 2023-07-05 20:24:51 -05:00 committed by Sam Atkins
parent cce50b1841
commit 52d6df5ee5
6 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2023, Jonah Shafran <jonahshafran@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/ExceptionOrUtils.h>
#include <LibWeb/MathML/MathMLElement.h>
namespace Web::MathML {
MathMLElement::~MathMLElement() = default;
MathMLElement::MathMLElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: DOM::Element(document, move(qualified_name))
{
}
void MathMLElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::MathMLElementPrototype>(realm, "MathMLElement"));
m_dataset = MUST(HTML::DOMStringMap::create(*this));
}
}