Created
May 4, 2011 12:42
-
-
Save borbit/955155 to your computer and use it in GitHub Desktop.
bug/feature in the backbone
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<script src="http://documentcloud.github.com/backbone/backbone-min.js"></script> | |
</head> | |
<body> | |
<script> | |
var Model = Backbone.Model.extend({ | |
method: function() { | |
console.log(this); | |
}, | |
sync: function() { | |
console.log(this); | |
} | |
}); | |
var test = new Model(); | |
test.method(); | |
test.save(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment