mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibHTML: Add is<ElementType> and to<ElementType> helper functions
These will help us write node-type-aware template functions.
This commit is contained in:
parent
bedb00603c
commit
f52f2736e1
12 changed files with 93 additions and 22 deletions
|
@ -80,3 +80,9 @@ private:
|
|||
Color m_active_link_color { Color::Red };
|
||||
Color m_visited_link_color { Color::Magenta };
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<Document>(const Node& node)
|
||||
{
|
||||
return node.is_document();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue