DomSync
A utility class for syncing DOM config objects to DOM elements. Syncing compares the new config with the previously used for that element, only applying the difference. Very much like a virtual DOM approach on a per element basis (element + its children).
Usage example:
DomSync.sync({
domConfig: {
className : 'b-outer',
children : [
{
className : 'b-child',
html : 'Child 1',
dataset : {
custom : true
}
},
{
className : 'b-child',
html : 'Child 2',
style : {
fontWeight : 'bold',
color : 'blue'
}
}
]
},
targetElement : target
});
No results