2023-07-05 22:24:51 -03:00
|
|
|
/*
|
|
|
|
|
* 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>
|
2024-10-29 07:07:02 -03:00
|
|
|
#include <LibWeb/HTML/HTMLOrSVGElement.h>
|
2023-07-05 22:24:51 -03:00
|
|
|
|
|
|
|
|
namespace Web::MathML {
|
|
|
|
|
|
|
|
|
|
class MathMLElement : public DOM::Element
|
2024-10-29 07:07:02 -03:00
|
|
|
, public HTML::GlobalEventHandlers
|
|
|
|
|
, public HTML::HTMLOrSVGElement<MathMLElement> {
|
2024-05-19 17:48:52 -03:00
|
|
|
WEB_PLATFORM_OBJECT(MathMLElement, DOM::Element);
|
2024-11-14 12:01:23 -03:00
|
|
|
GC_DECLARE_ALLOCATOR(MathMLElement);
|
2023-07-05 22:24:51 -03:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual ~MathMLElement() override;
|
|
|
|
|
|
2023-07-05 22:25:52 -03:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override;
|
|
|
|
|
|
2023-07-05 22:24:51 -03:00
|
|
|
protected:
|
2024-11-14 10:14:16 -03:00
|
|
|
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
2025-01-11 14:37:08 -03:00
|
|
|
virtual WebIDL::ExceptionOr<void> cloned(DOM::Node&, bool) const override;
|
2024-10-29 09:27:01 -03:00
|
|
|
virtual void inserted() override;
|
2024-11-14 12:01:23 -03:00
|
|
|
virtual GC::Ptr<DOM::EventTarget> global_event_handlers_to_event_target(FlyString const&) override { return *this; }
|
2023-07-05 22:24:51 -03:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
MathMLElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
|
2024-04-05 14:16:23 -03:00
|
|
|
virtual void visit_edges(Visitor&) override;
|
|
|
|
|
|
2023-07-05 22:24:51 -03:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|