Skip to content

Instantly share code, notes, and snippets.

@OliDM
Created March 12, 2015 14:21
Show Gist options
  • Save OliDM/1fda6cb71269aab4c8d4 to your computer and use it in GitHub Desktop.
Save OliDM/1fda6cb71269aab4c8d4 to your computer and use it in GitHub Desktop.
var model = {};
// Which we then observe
Object.observe(model, function(changes){
// This asynchronous callback runs
changes.forEach(function(change) {
// Letting us know what changed
console.log(change.type, change.name, change.oldValue);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment