Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created January 5, 2011 00:26
Show Gist options
  • Save erichocean/765713 to your computer and use it in GitHub Desktop.
Save erichocean/765713 to your computer and use it in GitHub Desktop.
SC.Binding.all
// Add Bindings
this.bindings = []; // will be filled in by the bind() method.
if (keys = this._bindings) {
for(loc=0, keysLen = keys.length; loc < keysLen;loc++) {
// get propertyKey
key = keys[loc] ; value = this[key] ;
propertyKey = key.slice(0,-7) ; // contentBinding => content
this[key] = this.bind(propertyKey, value) ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment