mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-04 16:11:54 +00:00
LibWeb: Add fast_is for span and div
This commit is contained in:
parent
23f3ecbe98
commit
a3e485e2d0
Notes:
github-actions[bot]
2025-04-28 18:47:04 +00:00
Author: https://github.com/teaalltr 🔰
Commit: a3e485e2d0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4459
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 16 additions and 0 deletions
|
@ -21,6 +21,8 @@ public:
|
|||
// https://www.w3.org/TR/html-aria/#el-div
|
||||
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::generic; }
|
||||
|
||||
virtual bool is_html_div_element() const override { return true; }
|
||||
|
||||
protected:
|
||||
HTMLDivElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
@ -31,3 +33,8 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLDivElement>() const { return is_html_div_element(); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue