LibHTML: Add is<ElementType> and to<ElementType> helper functions

These will help us write node-type-aware template functions.
This commit is contained in:
Andreas Kling 2019-10-06 20:37:39 +02:00
commit f52f2736e1
Notes: sideshowbarker 2024-07-19 11:46:35 +09:00
12 changed files with 93 additions and 22 deletions

View file

@ -19,3 +19,9 @@ private:
String m_data;
};
template<>
inline bool is<Text>(const Node& node)
{
return node.is_text();
}