diff options
Diffstat (limited to 'thirdparty/preact/src/vnode.js')
-rw-r--r-- | thirdparty/preact/src/vnode.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/thirdparty/preact/src/vnode.js b/thirdparty/preact/src/vnode.js new file mode 100644 index 000000000..1c3f10e3d --- /dev/null +++ b/thirdparty/preact/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; +} |