hsp/rt/cptcomponent.js
function (prevNode, newNode) {
      if (prevNode === newNode) {
          return;
      }
      TNode.replaceNodeBy.call(this,prevNode, newNode);
      var aen=this.attEltNodes;
      if (aen) {
          for (var i=0,sz=aen.length; sz>i;i++) {
              aen[i].replaceNodeBy(prevNode, newNode);
          }
      }
  }
function (prevNode, newNode) {
      if (prevNode === newNode) {
          return;
      }
      TNode.replaceNodeBy.call(this,prevNode, newNode);
      var aen=this.attEltNodes;
      if (aen) {
          for (var i=0,sz=aen.length; sz>i;i++) {
              aen[i].replaceNodeBy(prevNode, newNode);
          }
      }
  }
function ( prevNode , newNode ) { if ( prevNode === newNode ) { return ; } TNode . replaceNodeBy . call ( this , prevNode , newNode ) ; var aen = this . attEltNodes ; if ( aen ) { for ( var i = 0 , sz = aen . length ; sz > i ; i ++ ) { aen [ i ] . replaceNodeBy ( prevNode , newNode ) ; } } }
Recursively replace the DOM node by another node if it matches the preNode passed as argument
Recursively replace the DOM node by another node if it matches the preNode passed as argument