code: function (oldElt, newElt) {
              var parentNode = oldElt.parentNode;
              parentNode.insertBefore(newElt, oldElt);
              parentNode.removeChild(oldElt);
          }
docs: Simple utility method which replaces a dom element by another.
  @param {HTMLElement} oldElt
  @param {HTMLElement} newElt