Created
November 30, 2014 15:22
-
-
Save gvidon/966b2c7f19b59531c1e8 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
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
</head> | |
<body> | |
<script type="text/javascript" src="bower_components/underscore/underscore-min.js"></script> | |
<script type="text/javascript" src="bower_components/ring/ring.js"></script> | |
<script type="text/javascript"> | |
var | |
A = ring.create({ | |
testMe: function() { console.log('A'); _.result(this, '$super') } | |
}), | |
B = ring.create({ | |
testMe: function() { console.log('B'); _.result(this, '$super') } | |
}), | |
// Swapping to [B, A] will change the order of output | |
C = ring.create([A, B], { | |
testMe: function() { console.log('C'); this.$super() } | |
}), | |
D = ring.create(C, { | |
testMe: function() { console.log('D'); this.$super() } | |
}); | |
(new D).testMe(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment