mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^)
This commit is contained in:
parent
74fda2a761
commit
afc5fade05
5 changed files with 16 additions and 0 deletions
|
@ -34,6 +34,7 @@ public:
|
|||
private:
|
||||
// ^Node
|
||||
virtual FlyString node_name() const override { return "#shadow-root"; }
|
||||
virtual bool is_shadow_root() const final { return true; }
|
||||
|
||||
// NOTE: The specification doesn't seem to specify a default value for closed. Assuming false for now.
|
||||
bool m_closed { false };
|
||||
|
@ -41,4 +42,7 @@ private:
|
|||
bool m_available_to_element_internals { false };
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<ShadowRoot>() const { return is_shadow_root(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue