create a shadow dom when a custom element is mounted

This commit is contained in:
Evan Almloff committed 2023-04-12 10:05:09 -05:00
1 parent e7fb03f900
commit 788c00274e
5 files changed
+295 -97

No files matched your search

+4 -5
View File
@@ -304,12 +304,11 @@ impl<V: FromAnyValue + Send + Sync> RealDom<V> {
};
// call custom element watchers
let custom_element_manager = {
let node = self.get_mut(*node_id).unwrap();
node.get::<CustomElementManager<V>>().map(|x| x.clone())
};
let node = self.get_mut(*node_id).unwrap();
let custom_element_manager =
node.get::<CustomElementManager<V>>().map(|x| x.clone());
if let Some(custom_element_manager) = custom_element_manager {
custom_element_manager.on_attributes_changed(self, mask.attributes());
custom_element_manager.on_attributes_changed(node, mask.attributes());
}
}
}