src/js/libs/spiritual-gui.js
function(node1, node2) {
			node1 = node1 instanceof gui.Spirit ? node1.element : node1;
			node2 = node2 instanceof gui.Spirit ? node2.element : node2;
			return node1.compareDocumentPosition(node2);
		}
function(node1, node2) {
			node1 = node1 instanceof gui.Spirit ? node1.element : node1;
			node2 = node2 instanceof gui.Spirit ? node2.element : node2;
			return node1.compareDocumentPosition(node2);
		}
function ( node1 , node2 ) { node1 = node1 instanceof gui . Spirit ? node1 . element : node1 ; node2 = node2 instanceof gui . Spirit ? node2 . element : node2 ; return node1 . compareDocumentPosition ( node2 ) ; }
Compare document position of two nodes.
@see http://mdn.io/compareDocumentPosition
@param {Node|gui.Spirit} node1
@param {Node|gui.Spirit} node2
@returns {number}
Compare document position of two nodes .