1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 09:34:59 +00:00
serenity/Userland/Libraries/LibWeb/MathML/MathMLElement.cpp
Jonah 52d6df5ee5 LibWeb: Add the MathML Element
This patch introduces the MathML element, which provides the interface
all MathML elements are built from.
2023-08-12 07:59:23 +01:00

27 lines
669 B
C++

/*
* 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));
}
}