mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS+LibWeb: Add various fast_is<T>() helpers for common things
This commit is contained in:
committed by
Andreas Kling
parent
9f4a96de67
commit
737d9727c2
Notes:
github-actions[bot]
2025-12-20 15:14:14 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/737d9727c24 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7199
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user