euv-core 0.11.0

A declarative, cross-platform UI framework for Rust with virtual DOM, reactive signals, and HTML macros for WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::*;

/// Global set of CSS class names that have already been injected into the DOM.
///
/// Used by `Css::inject_style` to skip redundant injections when the same
/// class is encountered multiple times (e.g., 100 `<li>` elements sharing
/// `c_list_item`). Without this dedup, each occurrence would append a
/// duplicate text node to the `<style>` element, causing both memory
/// bloat and O(N) style-recalc cost in the browser.
pub(crate) static mut INJECTED_CLASSES: LazyLock<InjectedClassesCell> =
    LazyLock::new(|| InjectedClassesCell(UnsafeCell::new(HashSet::new())));