nl_tokens: @description Updates existing dom to match a new dom .
pl_tokens: function setDOM ( oldNode , newNode ) { // Ensure a realish dom node is provided. assert ( oldNode && oldNode . nodeType , 'You must provide a valid node to update.' ) // Alias document element with document. if ( oldNode . nodeType === DOCUMENT_TYPE ) oldNode = oldNode . documentElement // Document Fragments don't have attributes, so no need to look at checksums, ignored, attributes, or node replacement. if ( newNode . nodeType === DOCUMENT_FRAGMENT_TYPE ) { // Simply update all children (and subchildren). setChildNodes ( oldNode , newNode ) } else { // Otherwise we diff the entire old node. setNode ( oldNode , typeof newNode === 'string' // If a string was provided we will parse it as dom. ? parseHTML ( newNode , oldNode . nodeName ) : newNode ) } // Trigger mount events on initial set. if ( ! oldNode [ NODE_MOUNTED ] ) { oldNode [ NODE_MOUNTED ] = true <mask> ( oldNode ) } }