src/js/libs/spiritual-gui.js
function(node, selector, type) {
			var result = null;
			return this._qualify(node, selector)(function(node, selector) {
				if (type) {
					result = this.qall(node, selector, type)[0] || null;
				} else {
					try {
						result = node.querySelector(selector);
					} catch (exception) {
						console.error("Dysfunctional selector: " + selector);
						throw exception;
					}
				}
				return result;
			});
		}
function(node, selector, type) {
			var result = null;
			return this._qualify(node, selector)(function(node, selector) {
				if (type) {
					result = this.qall(node, selector, type)[0] || null;
				} else {
					try {
						result = node.querySelector(selector);
					} catch (exception) {
						console.error("Dysfunctional selector: " + selector);
						throw exception;
					}
				}
				return result;
			});
		}
function ( node , selector , type ) { var result = null ; return this . _qualify ( node , selector ) ( function ( node , selector ) { if ( type ) { result = this . qall ( node , selector , type ) [ 0 ] || null ; } else { try { result = node . querySelector ( selector ) ; } catch ( exception ) { console . error ( "Dysfunctional selector: " + selector ) ; throw exception ; } } return result ; } ) ; }
Get first element that matches a selector.
Optional type argument filters to spirit of type.
@param {Node} node
@param {String} selector
@param @optional {function} type
@returns {Element|gui.Spirit}
Get first element that matches a selector . Optional type argument filters to spirit of type .