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:
parent
cce50b1841
commit
52d6df5ee5
6 changed files with 78 additions and 0 deletions
27
Userland/Libraries/LibWeb/MathML/MathMLElement.cpp
Normal file
27
Userland/Libraries/LibWeb/MathML/MathMLElement.cpp
Normal 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));
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue