docs: function(currentNode, newNode, ignoreElements) {
        var currentCaret, activeElement,
            currentNodeContainsActiveElement = false;
        try {
          activeElement = document.activeElement;
        } catch (error) {
          activeElement = null;
        }
        if (activeElement && currentNode && $.contains(activeElement, currentNode)) {
          currentNodeContainsActiveElement = true;
        }
        if (currentNodeContainsActiveElement && this.supportsSelection(activeElement)) {
          currentCaret = this.getCaretPosition(activeElement);
        }
        this.hotswap(currentNode, newNode, ignoreElements);
        if (currentNodeContainsActiveElement && this.supportsSelection(activeElement)) {
          this.setCaretPosition(activeElement, currentCaret);
        }
      }