--
A library focuses to export foundation of the KDFramework view tree.
It exports:
KDTextNodeA type to represent a single text node that maps toDOM TextKDViewNodeA type to represent a single view node that maps toDOM Element
kdf-dom provides core functionality for KDFramework main component KDView.
Defines a DOM Element in a way that is applicable to KDFramework view layer,
and sets the minimum required functionality to be able to effectively render different
states of view tree.
{ KDViewNode } = require 'kdf-dom'
# represents the following:
# <span class="foo bar">Hello World!</span>
view = new KDViewNode
tagName : 'span'
cssClass : 'foo bar'
partial : 'Hello World!'You would almost never want to create a KDTextNode with the constructor
but here is how:
{ KDTextNode } = require 'kdf-dom'
# represents a `DOM Text` object:
# "Hello World!"
text = new KDTextNode { text: 'Hello World!' }npm install kdf-dom