public/javascripts/yui/dom/dom-debug.js
function(el) {
            var id, nodes, c, i, len, attr;

            if (el) {
                if (el[NODE_TYPE] || el.item) { // Node, or NodeList
                    return el;
                }

                if (typeof el === 'string') { // id
                    id = el;
                    el = document.getElementById(el);
                    attr = (el) ? el.attributes : null;
                    if (el && attr && attr.id && attr.id.value === id) { // IE: avoid false match on "name" attribute
                        return el;
                    } else if (el && document.all) { // filter by name
                        el = null;
                        nodes = document.all[id];
                        for (i = 0, len = nodes.length; i < len; ++i) {
                            if (nodes[i].id === id) {
                                return nodes[i];
                            }
                        }
                    }
                    return el;
                }
                
                if (YAHOO.util.Element && el instanceof YAHOO.util.Element) {
                    el = el.get('element');
                }

                if ('length' in el) { // array-like 
                    c = [];
                    for (i = 0, len = el.length; i < len; ++i) {
                        c[c.length] = Y.Dom.get(el[i]);
                    }
                    
                    return c;
                }

                return el; // some other object, just pass it back
            }

            return null;
        }
function(el) {
            var id, nodes, c, i, len, attr;

            if (el) {
                if (el[NODE_TYPE] || el.item) { // Node, or NodeList
                    return el;
                }

                if (typeof el === 'string') { // id
                    id = el;
                    el = document.getElementById(el);
                    attr = (el) ? el.attributes : null;
                    if (el && attr && attr.id && attr.id.value === id) { // IE: avoid false match on "name" attribute
                        return el;
                    } else if (el && document.all) { // filter by name
                        el = null;
                        nodes = document.all[id];
                        for (i = 0, len = nodes.length; i < len; ++i) {
                            if (nodes[i].id === id) {
                                return nodes[i];
                            }
                        }
                    }
                    return el;
                }
                
                if (YAHOO.util.Element && el instanceof YAHOO.util.Element) {
                    el = el.get('element');
                }

                if ('length' in el) { // array-like 
                    c = [];
                    for (i = 0, len = el.length; i < len; ++i) {
                        c[c.length] = Y.Dom.get(el[i]);
                    }
                    
                    return c;
                }

                return el; // some other object, just pass it back
            }

            return null;
        }
function ( el ) { var id , nodes , c , i , len , attr ; if ( el ) { if ( el [ NODE_TYPE ] || el . item ) { // Node, or NodeList return el ; } if ( typeof el === 'string' ) { // id id = el ; el = document . getElementById ( el ) ; attr = ( el ) ? el . attributes : null ; if ( el && attr && attr . id && attr . id . value === id ) { // IE: avoid false match on "name" attribute return el ; } else if ( el && document . all ) { // filter by name el = null ; nodes = document . all [ id ] ; for ( i = 0 , len = nodes . length ; i < len ; ++ i ) { if ( nodes [ i ] . id === id ) { return nodes [ i ] ; } } } return el ; } if ( YAHOO . util . Element && el instanceof YAHOO . util . Element ) { el = el . get ( 'element' ) ; } if ( 'length' in el ) { // array-like  c = [ ] ; for ( i = 0 , len = el . length ; i < len ; ++ i ) { c [ c . length ] = Y . Dom . get ( el [ i ] ) ; } return c ; } return el ; // some other object, just pass it back } return null ; }
Returns an HTMLElement reference.
@method get
@param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
@return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
Returns an HTMLElement reference .