javascript: added `this.` in for user provided connect/disconnect callbacks