mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Set self as containing_shadow_root for shadow roots
This commit is contained in:
parent
68bee1c771
commit
37e88e77cd
2 changed files with 3 additions and 8 deletions
|
@ -497,6 +497,9 @@ impl Element {
|
|||
// Steps 4, 5 and 6.
|
||||
let shadow_root = ShadowRoot::new(self, &*self.node.owner_doc());
|
||||
self.ensure_rare_data().shadow_root = Some(Dom::from_ref(&*shadow_root));
|
||||
shadow_root
|
||||
.upcast::<Node>()
|
||||
.set_containing_shadow_root(&shadow_root);
|
||||
|
||||
if self.is_connected() {
|
||||
self.node.owner_doc().register_shadow_root(&*shadow_root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue