diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-04 11:50:26 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-04 11:50:26 +0200 |
commit | 30b577138dda685f65a8529be1866afa6e321845 (patch) | |
tree | bfa92ee3ab485a6b11f86731777ecf5c5d166bab /src/vnode.js |
Squashed 'thirdparty/preact/' content from commit b2d90cc
git-subtree-dir: thirdparty/preact
git-subtree-split: b2d90cc116f1d1998f7a7c98dc6986bf4c1841f4
Diffstat (limited to 'src/vnode.js')
-rw-r--r-- | src/vnode.js | 14 |
1 files changed, 14 insertions, 0 deletions
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<string>|undefined} */ + this.attributes = attributes; + + /** @type {array<VNode>|undefined} */ + this.children = children; + + /** Reference to the given key. */ + this.key = attributes && attributes.key; +} |