src/js/libs/spiritual-gui.js
function(element, handler, arg) {
		var hasspirit = gui.hasModule('gui-spirits@wunderbyte.com');
		var directive = gui.Crawler.CONTINUE;
		var spirit = hasspirit ? element.spirit : null;
		if (spirit) {
			directive = spirit.oncrawler(this);
		}
		if (!directive) {
			if (handler) {
				if (gui.Type.isFunction(handler.handleElement)) {
					directive = handler.handleElement(element, arg);
				}
				if (directive !== gui.Crawler.STOP) {
					if (spirit && gui.Type.isFunction(handler.handleSpirit)) {
						directive = this._handleSpirit(spirit, handler);
					}
				}
			}
		}
		if (!directive) {
			directive = gui.Crawler.CONTINUE;
		}
		return directive;
	}
function(element, handler, arg) {
		var hasspirit = gui.hasModule('gui-spirits@wunderbyte.com');
		var directive = gui.Crawler.CONTINUE;
		var spirit = hasspirit ? element.spirit : null;
		if (spirit) {
			directive = spirit.oncrawler(this);
		}
		if (!directive) {
			if (handler) {
				if (gui.Type.isFunction(handler.handleElement)) {
					directive = handler.handleElement(element, arg);
				}
				if (directive !== gui.Crawler.STOP) {
					if (spirit && gui.Type.isFunction(handler.handleSpirit)) {
						directive = this._handleSpirit(spirit, handler);
					}
				}
			}
		}
		if (!directive) {
			directive = gui.Crawler.CONTINUE;
		}
		return directive;
	}
function ( element , handler , arg ) { var hasspirit = gui . hasModule ( 'gui-spirits@wunderbyte.com' ) ; var directive = gui . Crawler . CONTINUE ; var spirit = hasspirit ? element . spirit : null ; if ( spirit ) { directive = spirit . oncrawler ( this ) ; } if ( ! directive ) { if ( handler ) { if ( gui . Type . isFunction ( handler . handleElement ) ) { directive = handler . handleElement ( element , arg ) ; } if ( directive !== gui . Crawler . STOP ) { if ( spirit && gui . Type . isFunction ( handler . handleSpirit ) ) { directive = this . _handleSpirit ( spirit , handler ) ; } } } } if ( ! directive ) { directive = gui . Crawler . CONTINUE ; } return directive ; }
Handle element. Invoked by both ascending and descending crawler.
@param {Element} element
@param {object} handler
@returns {number} directive
Handle element . Invoked by both ascending and descending crawler .