Your test wasn’t testing the right stuff.
Here’s an updated version: http://mootools.net/shell/rArQA/1/
Currently `(new Class) instanceof Class` is false.
Our Class implementation is an object factory and not a base class.
You could create a Base class and subclass that if you want.
— Thomas Aylott
SubtleGradient
MooTools
On Jan 24, 2010, at 3:12 AM, אריה גלזר wrote:
> http://webreflection.blogspot.com/2010/01/better-javascript-classes.html
> the final implementation is very much like Moo's, but what's interesting is
> she is allowing the instanceof operator to keep working, which is something
> Moo's Class is missing (at least in this test it does). Which means it's hard
> to test interfaces and dependency injections.
> I'm now sure her implementation will work for this snippet though:
> var a = new Class({})'
> var b= new Class({extend:a});
> alert (b instanceof a);
>
> on the other hand, all the rest of her criticism for the FW's classes made me
> think she probably isn't that familiar with Moo's. but i might be wrong.
> -----------
> אריה גלזר
> 052-5348-561
> 5561