I have a situation where I instantiate a base class, but later may need to 
update the prototype once I gain more information.

*var Animal = new Class({});*
*var Cow = new Class({*
*  Extends: Animal*
*});*
*var something = new Animal();*

If I later find out that something is a Cow, how can I change it to be so? 
I know the once frowned upon method of setting __proto__ works in non-IE, 
but is there another way, or through MooTools? I only need IE9+ support.

*something.__proto__ = Cow.prototype;*
*if(something instanceof Cow)*
*  alert('moo');*

Thanks!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to