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
use crate::*;
/// A rendered view that holds real DOM nodes.
///
/// Unlike `VirtualNode` which represents a virtual DOM tree that must be
/// converted to real DOM, `View` wraps actual `web_sys::Node` instances
/// that are already attached (or ready to be attached) to the document.
///
/// This is the output type of the `html!` macro in the new architecture.
/// Each `View` carries one or more DOM nodes plus optional cleanup logic
/// that runs when the view is removed from the document.
/// A thin wrapper for a single DOM node that can be inserted into a parent.
///
/// Used internally by the `html!` macro to pass child views into parent
/// element construction without allocating a `Vec`.