src/js/libs/spiritual-gui.js
function(type) {
			var result = [];
			var crawler = new gui.Crawler();
			if (type) {
				crawler.ascend(this.element, {
					handleSpirit: function(spirit) {
						if (spirit instanceof type) {
							result.push(spirit);
						}
					}
				});
			} else {
				crawler.ascend(this.element, {
					handleElement: function(el) {
						result.push(el);
					}
				});
			}
			return result;
		}
function(type) {
			var result = [];
			var crawler = new gui.Crawler();
			if (type) {
				crawler.ascend(this.element, {
					handleSpirit: function(spirit) {
						if (spirit instanceof type) {
							result.push(spirit);
						}
					}
				});
			} else {
				crawler.ascend(this.element, {
					handleElement: function(el) {
						result.push(el);
					}
				});
			}
			return result;
		}
function ( type ) { var result = [ ] ; var crawler = new gui . Crawler ( ) ; if ( type ) { crawler . ascend ( this . element , { handleSpirit : function ( spirit ) { if ( spirit instanceof type ) { result . push ( spirit ) ; } } } ) ; } else { crawler . ascend ( this . element , { handleElement : function ( el ) { result . push ( el ) ; } } ) ; } return result ; }
First ancestor elements or ancestor spirits of type.
@param @optional {function} type Spirit constructor
@returns {Array<Element|gui.Spirit>}
First ancestor elements or ancestor spirits of type .