Explorar o código

LibWeb: Actually connect ShadowRoot to its host element

This way we can traverse from inside a shadow root across the boundary
to the outside. :^)
Andreas Kling %!s(int64=3) %!d(string=hai) anos
pai
achega
a033dfc885
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      Userland/Libraries/LibWeb/DOM/Element.cpp

+ 1 - 0
Userland/Libraries/LibWeb/DOM/Element.cpp

@@ -383,6 +383,7 @@ void Element::set_shadow_root(RefPtr<ShadowRoot> shadow_root)
     if (m_shadow_root == shadow_root)
         return;
     m_shadow_root = move(shadow_root);
+    m_shadow_root->set_host(*this);
     invalidate_style();
 }