scrollBufferToBottom() JS functionality.