Skip to content

Instantly share code, notes, and snippets.

@kjelelokk
Created November 29, 2012 10:09
Show Gist options
  • Save kjelelokk/4167964 to your computer and use it in GitHub Desktop.
Save kjelelokk/4167964 to your computer and use it in GitHub Desktop.
Dojo class inheritance
// 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