aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/documentorshadowroot.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2025-01-04 06:45:27 +0100
committerGitHub <noreply@github.com>2025-01-04 05:45:27 +0000
commit75a22cfe2eb6c4822d5cda98e84cc88c1e4ce941 (patch)
treed5c9268e89db9fbc5647e019f08410a8a8afdad7 /components/script/dom/documentorshadowroot.rs
parent1ab55e6b113b7bea1abb27cc75c52f60f40306b6 (diff)
downloadservo-75a22cfe2eb6c4822d5cda98e84cc88c1e4ce941.tar.gz
servo-75a22cfe2eb6c4822d5cda98e84cc88c1e4ce941.zip
Ensure Element ID modifications inside disconnected shadow roots are registered (#34834)
* Add test for modifying element IDs in disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Register element ID modifications inside disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Don't crash when registering named elements in disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix test title Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/script/dom/documentorshadowroot.rs')
-rw-r--r--components/script/dom/documentorshadowroot.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs
index 96323156ba8..c814b75cfda 100644
--- a/components/script/dom/documentorshadowroot.rs
+++ b/components/script/dom/documentorshadowroot.rs
@@ -303,7 +303,7 @@ impl DocumentOrShadowRoot {
root: DomRoot<Node>,
) {
debug!("Adding named element {:p}: {:p} id={}", self, element, id);
- assert!(element.upcast::<Node>().is_connected());
+ assert!(element.upcast::<Node>().is_connected_to_tree());
assert!(!id.is_empty());
let mut id_map = id_map.borrow_mut();
let elements = id_map.entry(id.clone()).or_default();