mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibHTML: Add LayoutNode::is_image() and is<LayoutImage> helper
This commit is contained in:
parent
7cc4b90b16
commit
85ac9705ba
2 changed files with 8 additions and 0 deletions
|
@ -19,4 +19,11 @@ public:
|
|||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "LayoutImage"; }
|
||||
virtual bool is_image() const override { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<LayoutImage>(const LayoutNode& node)
|
||||
{
|
||||
return node.is_image();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue