LibWeb: Add fast_is<T>() for variously commonly-checked DOM node types

This commit is contained in:
Andreas Kling
2025-12-15 17:30:06 -06:00
committed by Andreas Kling
parent dffb971436
commit 9e5ce016d5
Notes: github-actions[bot] 2025-12-20 15:14:50 +00:00
7 changed files with 60 additions and 0 deletions

View File

@@ -137,6 +137,8 @@ public:
private:
HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName);
virtual bool is_html_textarea_element() const final { return true; }
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
@@ -175,3 +177,10 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLTextAreaElement>() const { return is_html_textarea_element(); }
}