mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +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
|
@ -6,7 +6,7 @@ public:
|
|||
LayoutReplaced(const Element&, NonnullRefPtr<StyleProperties>);
|
||||
virtual ~LayoutReplaced() override;
|
||||
|
||||
const Element& node() const { return static_cast<const Element&>(*LayoutNode::node()); }
|
||||
const Element& node() const { return to<Element>(*LayoutNode::node()); }
|
||||
|
||||
virtual bool is_replaced() const final { return true; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue