I' m building a system on top of John Resig' s class inheritance implementation (javascript)
All works well except for the fact that for inspecting/debugging purposes (and perhaps for typechecking later on, I'd like to have a handle on the actual name of the instantiated Class.
e.g: following the example from John, return Ninja
instead of Class
.
I'm aware that this name is coming from this.__proto__.constructor.name
but this prop is readonly. I guess it has to be part of the initialization of the subclasss itself.
Anyone?