Created
March 19, 2014 15:41
-
-
Save nekman/9644439 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 person = { shoeSize: 43, name: 'nekman' }; | |
Object.observe(person, function(changes) { | |
var change = changes[0]; | |
console.log('Changed property "%s" from %s to %s.', | |
change.name, | |
change.oldValue, | |
change.object[change.name] | |
); | |
}); | |
// change a object property... | |
person.shoeSize = 44; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment