Files
ladybird/Userland/Libraries/LibWeb/MathML/MathMLElement.h
Jelle Raaijmakers 5f84c2c3af LibWeb: Factor out HTMLOrSVGElement
This is a mixin in the IDL, so let's treat it as a mixin in our code and
let both SVGElement and MathMLElement reuse the implementations that we
wrote for HTMLElement.
2024-10-31 10:46:21 +01:00

38 lines
922 B
C++

/*
* Copyright (c) 2023, Jonah Shafran <jonahshafran@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Element.h>
#include <LibWeb/HTML/GlobalEventHandlers.h>
#include <LibWeb/HTML/HTMLOrSVGElement.h>
namespace Web::MathML {
class MathMLElement : public DOM::Element
, public HTML::GlobalEventHandlers
, public HTML::HTMLOrSVGElement<MathMLElement> {
WEB_PLATFORM_OBJECT(MathMLElement, DOM::Element);
JS_DECLARE_ALLOCATOR(MathMLElement);
public:
virtual ~MathMLElement() override;
virtual Optional<ARIA::Role> default_role() const override;
protected:
virtual JS::GCPtr<DOM::EventTarget> global_event_handlers_to_event_target(FlyString const&) override { return *this; }
private:
MathMLElement(DOM::Document&, DOM::QualifiedName);
virtual void visit_edges(Visitor&) override;
virtual void initialize(JS::Realm&) override;
};
}