mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibWeb: Add fast_is<T>() for variously commonly-checked DOM node types
This commit is contained in:
committed by
Andreas Kling
parent
dffb971436
commit
9e5ce016d5
Notes:
github-actions[bot]
2025-12-20 15:14:50 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/9e5ce016d50 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7199
@@ -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(); }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user