function getParents(node, rootNode) {
		var parents = [];

		while (node && node != rootNode) {
			parents.push(node);
			node = node.parentNode;
		}

		return parents;
	}
This module contains logic for moving around a virtual caret in logical order within a DOM element.

It ignores the most obvious invalid caret locations such as within a script element or within a
contentEditable=false element but it will return locations that isn't possible to render visually.

@private
@class tinymce.caret.CaretWalker
@example
var caretWalker = new CaretWalker(rootElm);

var prevLogicalCaretPosition = caretWalker.prev(CaretPosition.fromRangeStart(range));
var nextLogicalCaretPosition = caretWalker.next(CaretPosition.fromRangeEnd(range));