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