Created
December 10, 2015 17:36
-
-
Save mishelashala/9556a64a1239af7e7cfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = { | |
cache() { | |
this.el = document.querySelector('#some-id'); | |
this.bindElement(); | |
}, | |
bindElement() { | |
this.el.addEventListener('click', this.handleClick.bind(this)); | |
}, | |
handleClick(e) { | |
alert('NO toques mis cosas!'); | |
}, | |
init() { | |
this.cache(); | |
} | |
}; | |
app.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment