Skip to content

Instantly share code, notes, and snippets.

@enricopolanski
Created May 20, 2018 16:06
Show Gist options
  • Select an option

  • Save enricopolanski/fd0d2665c39b1ecca1d8902f788eefc8 to your computer and use it in GitHub Desktop.

Select an option

Save enricopolanski/fd0d2665c39b1ecca1d8902f788eefc8 to your computer and use it in GitHub Desktop.
import { bindings } from '../view/bindings';
class Controller {
constructor(userData, dateTimeManager, main, bindings){
/**/
this.bindings = bindings.bind(this);
}
addBindings(){
window.onclick = this.bindings;
}
}
const start = () => {
/* lots of stuff */
const controller = new Controller(userData, dateTimeManager, main, bindings);
controller.addBindings();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment