Created
June 18, 2016 19:02
-
-
Save kawasako/ef177cd70f9650c3b24bf8d927ee4310 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
export default class HogeWidget { | |
constructor(el) { | |
this.el = el; | |
} | |
bind() { | |
this.el.addEventListener('click', () => { ... }); | |
} | |
init() { | |
this.bind(); | |
} | |
} | |
/* | |
<div data-widget="hoge">clickable!</hoge> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment