Advertisement
Guest User

Y E E T

a guest
Mar 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. class Controller {
  2. constructor() {
  3. this.model = new KlokModel();
  4. this.view = new KlokView(this.model);
  5.  
  6. document.getElementById("buttonStartUpdatingTime").addEventListener("click", this.startUpdating.bind(this));
  7. document.getElementById("buttonStopUpdatingTime").addEventListener("click", this.stopUpdating.bind(this));
  8. document.getElementById("buttonStartCountingDown").addEventListener("click", this.startCounting.bind(this));
  9. document.getElementById("buttonStopCountingDown").addEventListener("click", this.stopCounting.bind(this));
  10. }
  11.  
  12. startUpdating() {
  13. this.model.startUpdating();
  14. }
  15.  
  16. stopUpdating() {
  17. this.model.stopUpdating();
  18. }
  19.  
  20. startCounting() {
  21. this.model.startCounting();
  22. }
  23.  
  24. stopCounting() {
  25. this.model.stopCounting();
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement