Init of javascript implementation to handle websocket events