lib/kissy/5.0.0-alpha.3/build/node-debug.js
function (selector, context) {
            // are we dealing with html string ?
            // TextNode 仍需要自己 new Node
            if (typeof selector === 'string' && (selector = util.trim(selector)) && selector.length >= 3 && util.startsWith(selector, '<') && util.endsWith(selector, '>')) {
                var attrs;
                if (context) {
                    if (context.getDOMNode) {
                        context = context[0];
                    }
                    if (!context.nodeType) {
                        attrs = context;
                        context = arguments[2];
                    }
                }
                return new Node(selector, attrs, context);
            }
            return new Node(Dom.query(selector, context));
        }
function (selector, context) {
            // are we dealing with html string ?
            // TextNode 仍需要自己 new Node
            if (typeof selector === 'string' && (selector = util.trim(selector)) && selector.length >= 3 && util.startsWith(selector, '<') && util.endsWith(selector, '>')) {
                var attrs;
                if (context) {
                    if (context.getDOMNode) {
                        context = context[0];
                    }
                    if (!context.nodeType) {
                        attrs = context;
                        context = arguments[2];
                    }
                }
                return new Node(selector, attrs, context);
            }
            return new Node(Dom.query(selector, context));
        }
function ( selector , context ) { // are we dealing with html string ? // TextNode 仍需要自己 new Node if ( typeof selector === 'string' && ( selector = util . trim ( selector ) ) && selector . length >= 3 && util . startsWith ( selector , '<' ) && util . endsWith ( selector , '>' ) ) { var attrs ; if ( context ) { if ( context . getDOMNode ) { context = context [ 0 ] ; } if ( ! context . nodeType ) { attrs = context ; context = arguments [ 2 ] ; } } return new Node ( selector , attrs , context ) ; } return new Node ( Dom . query ( selector , context ) ) ; }
Get node list from selector or construct new node list from html string.
Can also called from KISSY.all
@param {String|KISSY.Node} selector Selector string or html string or common dom node.
@param {String|KISSY.Node} [context] Search context for selector
@return {KISSY.Node}
@member KISSY.Node
@static
Get node list from selector or construct new node list from html string . Can also called from KISSY . all