euv_core/renderer/static.rs
1use crate::*;
2
3/// Global auto-incrementing ID counter for DOM elements.
4///
5/// Used to assign a unique `data-euv-id` attribute to each element
6/// that receives an event listener, providing a stable identity across
7/// re-renders.
8pub static NEXT_EUV_ID: AtomicUsize = AtomicUsize::new(1);
9
10/// Global pointer to the handler registry.
11///
12/// Lazily initialized on first access via `Box::leak`. Because WASM
13/// is single-threaded, concurrent access is impossible and raw
14/// pointer access is safe.
15pub static mut HANDLER_REGISTRY: *mut HashMap<(usize, String), HandlerEntry> = null_mut();