1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use crate::*;
/// Global auto-incrementing ID counter for DOM elements.
///
/// Used to assign a unique `data-euv-id` attribute to each element
/// that receives an event listener, providing a stable identity across
/// re-renders.
pub static NEXT_EUV_ID: AtomicUsize = new;
/// Global auto-incrementing ID counter for DynamicNode placeholder elements.
///
/// Used to assign a unique `data-euv-dynamic-id` attribute to each
/// DynamicNode placeholder `<div>`, enabling lifecycle management of
/// `__euv_signal_update__` event listeners tied to that placeholder.
pub static NEXT_EUV_DYNAMIC_ID: AtomicUsize = new;
/// Global pointer to the handler registry.
///
/// Lazily initialized on first access via `Box::leak`. Because WASM
/// is single-threaded, concurrent access is impossible and raw
/// pointer access is safe.
pub static mut HANDLER_REGISTRY: *mut = null_mut;
/// Global pointer to the DynamicNode listener registry.
///
/// Maps a `data-euv-dynamic-id` value to the `JsValue` reference of the
/// `__euv_signal_update__` event listener closure previously registered
/// for that placeholder. When a new listener is registered for the same
/// placeholder, the old one is removed via `removeEventListener` first
/// to prevent listener accumulation and memory leaks on route changes.
///
/// Lazily initialized on first access via `Box::leak`.
pub static mut DYNAMIC_LISTENER_REGISTRY: *mut = null_mut;
/// Global pointer to the attribute signal listener registry.
///
/// Maps a `Signal<String>` inner pointer address to the `JsValue`
/// reference of the `__euv_signal_update__` event listener closure
/// registered by `subscribe_attr_signal`. When a new listener is
/// registered for the same signal, the old one is removed first
/// to prevent listener accumulation.
///
/// Lazily initialized on first access via `Box::leak`.
pub static mut ATTR_SIGNAL_LISTENER_REGISTRY: *mut = null_mut;