Created
November 29, 2012 10:09
-
-
Save kjelelokk/4167964 to your computer and use it in GitHub Desktop.
Dojo class inheritance
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
// Klasse A | |
var A = declare(null, { | |
// Noen properties | |
propertyA: 'Yes', | |
propertyB: 2 | |
}); | |
// Klasse B | |
var B = declare(A, { | |
// Noen properties | |
propertyA: 'Maybe', | |
propertyB: 1, | |
propertyC: true | |
}); | |
// Klasse C | |
var C = declare([A, B], { | |
// Noen properties | |
propertyA: 'No', | |
propertyB: 99, | |
propertyD: false | |
}); | |
var instance = new C(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment