public/js-roguelike-skeleton/src/console.js
function(message){
            if(this.el.children.length > this.messageHistoryCount - 1){
                var childEl = this.el.childNodes[0];
                childEl.remove();
            }

            var messageEl = document.createElement('div');
            messageEl.innerHTML = message;
            this.el.appendChild(messageEl);

        }
function(message){
            if(this.el.children.length > this.messageHistoryCount - 1){
                var childEl = this.el.childNodes[0];
                childEl.remove();
            }

            var messageEl = document.createElement('div');
            messageEl.innerHTML = message;
            this.el.appendChild(messageEl);

        }
function ( message ) { if ( this . el . children . length > this . messageHistoryCount - 1 ) { var childEl = this . el . childNodes [ 0 ] ; childEl . remove ( ) ; } var messageEl = document . createElement ( 'div' ) ; messageEl . innerHTML = message ; this . el . appendChild ( messageEl ) ; }
Adds a message to the console.
@method log
@param {String} - Message to be added.
Adds a message to the console .