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
47
48
49
50
51
52
53
54
55
56
57
58
use *;
/// Cached table of JS batched DOM-op helpers.
///
/// Resolved lazily on first patch via [`ensure_dom_op_table`]. The
/// functions accept parallel arrays / op-tuples so a single JS-side
/// loop replaces N individual `setAttribute` / `removeAttribute` /
/// `insertBefore` / `appendChild` / `removeChild` crossings.
pub
/// A single child-mutation op for [`apply_child_ops_batch`].
///
/// Each variant maps to exactly one web-sys call, preserving the
/// semantics of the previous per-op patch path:
/// - `InsertBefore { node, reference }` →
/// `parent.insert_before(node, Some(reference))` if reference is
/// `Some`, else `parent.append_child(node)`.
/// - `AppendChild(node)` → `parent.append_child(node)`.
/// - `RemoveChild(node)` → `parent.remove_child(node)`.
pub
/// `Sync` wrapper around `Option<DomOpTable>` for `thread_local!`
/// storage.
pub );
thread_local!