LibJS+LibWeb: Add various fast_is<T>() helpers for common things

This commit is contained in:
Andreas Kling
2025-12-15 20:14:39 -06:00
committed by Andreas Kling
parent 9f4a96de67
commit 737d9727c2
Notes: github-actions[bot] 2025-12-20 15:14:14 +00:00
10 changed files with 69 additions and 0 deletions

View File

@@ -419,3 +419,13 @@ template<>
inline bool Node::fast_is<HTML::HTMLInputElement>() const { return is_html_input_element(); }
}
namespace JS {
template<>
inline bool Object::fast_is<Web::HTML::HTMLInputElement>() const
{
return is_dom_node() && static_cast<Web::DOM::Node const&>(*this).is_html_input_element();
}
}