src/js/libs/spiritual-gui.js
function(type) {
			var result = null,
				spirit = null,
				el = this.spirit.element.lastElementChild;
			if (type) {
				while (result === null && el !== null) {
					spirit = el.spirit;
					if (spirit !== null && spirit instanceof type) {
						result = spirit;
					}
					el = el.previoustElementSibling;
				}
			} else {
				result = el;
			}
			return result;
		}
function(type) {
			var result = null,
				spirit = null,
				el = this.spirit.element.lastElementChild;
			if (type) {
				while (result === null && el !== null) {
					spirit = el.spirit;
					if (spirit !== null && spirit instanceof type) {
						result = spirit;
					}
					el = el.previoustElementSibling;
				}
			} else {
				result = el;
			}
			return result;
		}
function ( type ) { var result = null , spirit = null , el = this . spirit . element . lastElementChild ; if ( type ) { while ( result === null && el !== null ) { spirit = el . spirit ; if ( spirit !== null && spirit instanceof type ) { result = spirit ; } el = el . previoustElementSibling ; } } else { result = el ; } return result ; }
Last element or last spirit of type.
@param @optional {function} type Spirit constructor
@returns {Element|gui.Spirit}
Last element or last spirit of type .