Skip to content

Instantly share code, notes, and snippets.

@samirbr
Created June 26, 2015 18:14
Show Gist options
  • Save samirbr/b79431f79025c37359eb to your computer and use it in GitHub Desktop.
Save samirbr/b79431f79025c37359eb to your computer and use it in GitHub Desktop.
Array.prototype.forEach(document.querySelectorAll('[bind]'), function (bindable) {
this.value = application[this.attribues.get('bind')];
bindable.addEventListener('keyup', (function (event) {
application[this.attribues.get('bind')] = this.value;
}).bind(bindable));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment