Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Controller {
- constructor() {
- this.model = new KlokModel();
- this.view = new KlokView(this.model);
- document.getElementById("buttonStartUpdatingTime").addEventListener("click", this.startUpdating.bind(this));
- document.getElementById("buttonStopUpdatingTime").addEventListener("click", this.stopUpdating.bind(this));
- document.getElementById("buttonStartCountingDown").addEventListener("click", this.startCounting.bind(this));
- document.getElementById("buttonStopCountingDown").addEventListener("click", this.stopCounting.bind(this));
- }
- startUpdating() {
- this.model.startUpdating();
- }
- stopUpdating() {
- this.model.stopUpdating();
- }
- startCounting() {
- this.model.startCounting();
- }
- stopCounting() {
- this.model.stopCounting();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement