LibWeb: Add more fast_is<T> helpers for DOM::Node subclasses

This commit is contained in:
Andreas Kling 2025-04-18 10:27:59 +02:00 committed by Andreas Kling
commit aecb144df0
Notes: github-actions[bot] 2025-04-18 12:47:31 +00:00
10 changed files with 68 additions and 1 deletions

View file

@ -31,6 +31,8 @@ private:
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
virtual bool is_svg_a_element() const override { return true; }
// ^DOM::Element
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
virtual i32 default_tab_index_value() const override;
@ -39,3 +41,8 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<SVG::SVGAElement>() const { return is_svg_a_element(); }
}