1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:08:10 +00:00

LibWeb: Add a way to give DOM::Element a ShadowRoot

You can now attach a shadow root to your favorite Element. It doesn't
do anything yet, but you can.
This commit is contained in:
Andreas Kling 2021-02-10 18:21:35 +01:00
parent bf82e7fba2
commit d597626ea1
2 changed files with 15 additions and 1 deletions

View file

@ -101,6 +101,10 @@ public:
NonnullRefPtrVector<Element> get_elements_by_tag_name(const FlyString&) const;
NonnullRefPtrVector<Element> get_elements_by_class_name(const FlyString&) const;
ShadowRoot* shadow_root() { return m_shadow_root; }
const ShadowRoot* shadow_root() const { return m_shadow_root; }
void set_shadow_root(RefPtr<ShadowRoot>);
protected:
RefPtr<Layout::Node> create_layout_node() override;
@ -116,6 +120,8 @@ private:
RefPtr<CSS::StyleProperties> m_specified_css_values;
Vector<FlyString> m_classes;
RefPtr<ShadowRoot> m_shadow_root;
};
template<>