lib/packages/core-classes.js
function(element) {

		// note: target of some events can be the root html tag (for example, mousedown on a scroll bar)
		var document_ref = window.document, // document > html > body > ...
			result = [];

		while (element && element != document_ref) {

			result.push(element);
			element = element.parentNode;

		}

		// you must not modify the returned array, but you can slice() it
		if (Lava.schema.DEBUG && Object.freeze) {
			Object.freeze(result);
		}

		return result;

	}
function(element) {

		// note: target of some events can be the root html tag (for example, mousedown on a scroll bar)
		var document_ref = window.document, // document > html > body > ...
			result = [];

		while (element && element != document_ref) {

			result.push(element);
			element = element.parentNode;

		}

		// you must not modify the returned array, but you can slice() it
		if (Lava.schema.DEBUG && Object.freeze) {
			Object.freeze(result);
		}

		return result;

	}
function ( element ) { // note: target of some events can be the root html tag (for example, mousedown on a scroll bar) var document_ref = window . document , // document > html > body > ... result = [ ] ; while ( element && element != document_ref ) { result . push ( element ) ; element = element . parentNode ; } // you must not modify the returned array, but you can slice() it if ( Lava . schema . DEBUG && Object . freeze ) { Object . freeze ( result ) ; } return result ; }
Create an array from element and all it's parents
@param {HTMLElement} element
@returns {Array.<HTMLElement>}
Create an array from element and all it s parents