src/console/simpleyui.js
function() {
        var str = this[UID] + ': not bound to a node',
            node = this._node,
            attrs, id, className;

        if (node) {
            attrs = node.attributes;
            id = (attrs && attrs.id) ? node.getAttribute('id') : null;
            className = (attrs && attrs.className) ? node.getAttribute('className') : null;
            str = node[NODE_NAME];

            if (id) {
                str += '#' + id; 
            }

            if (className) {
                str += '.' + className.replace(' ', '.'); 
            }

            // TODO: add yuid?
            str += ' ' + this[UID];
        }
        return str;
    }
function() {
        var str = this[UID] + ': not bound to a node',
            node = this._node,
            attrs, id, className;

        if (node) {
            attrs = node.attributes;
            id = (attrs && attrs.id) ? node.getAttribute('id') : null;
            className = (attrs && attrs.className) ? node.getAttribute('className') : null;
            str = node[NODE_NAME];

            if (id) {
                str += '#' + id; 
            }

            if (className) {
                str += '.' + className.replace(' ', '.'); 
            }

            // TODO: add yuid?
            str += ' ' + this[UID];
        }
        return str;
    }
function ( ) { var str = this [ UID ] + ': not bound to a node' , node = this . _node , attrs , id , className ; if ( node ) { attrs = node . attributes ; id = ( attrs && attrs . id ) ? node . getAttribute ( 'id' ) : null ; className = ( attrs && attrs . className ) ? node . getAttribute ( 'className' ) : null ; str = node [ NODE_NAME ] ; if ( id ) { str += '#' + id ; } if ( className ) { str += '.' + className . replace ( ' ' , '.' ) ; } // TODO: add yuid? str += ' ' + this [ UID ] ; } return str ; }
The method called when outputting Node instances as strings
@method toString
@return {String} A string representation of the Node instance
The method called when outputting Node instances as strings