Skip to content

Commit 5472b19

Browse files
committed
start hydration validation
1 parent a393f08 commit 5472b19

2 files changed

Lines changed: 682 additions & 3 deletions

File tree

packages/web/src/dom.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ pub struct WebsysDom {
4848

4949
#[cfg(feature = "hydrate")]
5050
pub(crate) suspense_hydration_ids: crate::hydration::SuspenseHydrationIds,
51+
52+
/// Hydration validator for debug mode - validates DOM matches vdom expectations
53+
#[cfg(feature = "hydrate")]
54+
#[cfg(debug_assertions)]
55+
pub(crate) hydration_validator: Option<crate::hydration::HydrationValidator>,
5156
}
5257

5358
impl WebsysDom {
@@ -129,6 +134,9 @@ impl WebsysDom {
129134
skip_mutations: false,
130135
#[cfg(feature = "hydrate")]
131136
suspense_hydration_ids: Default::default(),
137+
#[cfg(feature = "hydrate")]
138+
#[cfg(debug_assertions)]
139+
hydration_validator: None,
132140
}
133141
}
134142
}

0 commit comments

Comments
 (0)