More detach shadow changes

This commit is contained in:
Fernando Jiménez Moreno 2019-06-18 12:36:25 +02:00
parent d4be72d386
commit ef02196dd8
5 changed files with 32 additions and 9 deletions

View file

@ -505,7 +505,6 @@ impl Element {
pub fn detach_shadow(&self) {
if let Some(ref shadow_root) = self.shadow_root() {
shadow_root.detach();
self.node.owner_doc().unregister_shadow_root(shadow_root);
self.ensure_rare_data().shadow_root = None;
} else {
debug_assert!(false, "Trying to detach a non-attached shadow root");