Small, fast, elegant, powerful, and cross platform JavaScript OOP library. Support main(), singleton, super call, private, mixins, plugins, AOP and more.
MIT License
301
stars
46
forks
source link
Super's constructor not getting called if sub class not defining constructor (yes, again). #32
Actually it's a first OOP model I ever seen, which behaves this way. In most cases you expect parent's constructor to be called. If you don't need parent's class constructor to be called from child class, you could define constructor in child class without a $super call, right?
Nope. Not in this library. You have to create an empty constructors, containing only super's call here.
Just reopening this issue: https://github.com/tnhu/jsface/issues/13
Actually it's a first OOP model I ever seen, which behaves this way. In most cases you expect parent's constructor to be called. If you don't need parent's class constructor to be called from child class, you could define constructor in child class without a $super call, right?
Nope. Not in this library. You have to create an empty constructors, containing only super's call here.