UNPKG

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