var app = (function(){ var app = {} app.init = function(){ // app.socket = } document.addEventListener('DOMContentLoaded', app.init) })()