mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00: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
36
Userland/Libraries/LibWeb/MathML/MathMLElement.h
Normal file
36
Userland/Libraries/LibWeb/MathML/MathMLElement.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Jonah Shafran <jonahshafran@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/DOMStringMap.h>
|
||||
#include <LibWeb/HTML/GlobalEventHandlers.h>
|
||||
|
||||
namespace Web::MathML {
|
||||
|
||||
class MathMLElement : public DOM::Element
|
||||
, public HTML::GlobalEventHandlers {
|
||||
WEB_PLATFORM_OBJECT(MathMLElement, Element);
|
||||
|
||||
public:
|
||||
virtual ~MathMLElement() override;
|
||||
|
||||
HTML::DOMStringMap* dataset() { return m_dataset.ptr(); }
|
||||
HTML::DOMStringMap const* dataset() const { return m_dataset.ptr(); }
|
||||
|
||||
protected:
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(FlyString const&) override { return *this; }
|
||||
|
||||
private:
|
||||
MathMLElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
JS::GCPtr<HTML::DOMStringMap> m_dataset;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue