blob: 1c3f10e3dc11146a995b929841127cb915e8db8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/** Virtual DOM Node */
export function VNode(nodeName, attributes, children) {
/** @type {string|function} */
this.nodeName = nodeName;
/** @type {object<string>|undefined} */
this.attributes = attributes;
/** @type {array<VNode>|undefined} */
this.children = children;
/** Reference to the given key. */
this.key = attributes && attributes.key;
}
|