From 30b577138dda685f65a8529be1866afa6e321845 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 4 Oct 2016 11:50:26 +0200 Subject: Squashed 'thirdparty/preact/' content from commit b2d90cc git-subtree-dir: thirdparty/preact git-subtree-split: b2d90cc116f1d1998f7a7c98dc6986bf4c1841f4 --- src/vnode.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/vnode.js (limited to 'src/vnode.js') diff --git a/src/vnode.js b/src/vnode.js new file mode 100644 index 000000000..1c3f10e3d --- /dev/null +++ b/src/vnode.js @@ -0,0 +1,14 @@ +/** Virtual DOM Node */ +export function VNode(nodeName, attributes, children) { + /** @type {string|function} */ + this.nodeName = nodeName; + + /** @type {object|undefined} */ + this.attributes = attributes; + + /** @type {array|undefined} */ + this.children = children; + + /** Reference to the given key. */ + this.key = attributes && attributes.key; +} -- cgit v1.2.3