All that Class.refactor does is allow you to assign new properties to a class in the same manner as extending the class onto itself without destroying the namespace.
This functionality comes in two flavors: A static method on the Class namespace and a method available on all classes defined after this script is included in your environment. Why two flavors? Because any class that is defined before Class.Refactor.js is included in your environment won’t have the method baked in.
Related Submissions:
- MooTools 1.2 Class Template Starting a MooTools class can be difficult if you haven’t created one before. Here’s a template you can copy, paste, and use to create your...
- Mootools 1.2 cvLinkSelect class If you’re making a form with today’s standards you often have to make several select elements with the options of the next select elements referring...
- MooTools: Up The Moo Herd IV: There’s A Class For This Gather round boys and girls! It’s time for another episode of Up the Moo Herd: MooTools Tips and Tricks! In the previous installment, we talked...
- Class.js JavaScript by nature does not have classes like other languages. This has been a source of frustration for developers trying to create complex applications. Class.js...
- Creating and Enhancing Dojo Classes Like all top-notch JavaScript toolkits, Dojo tries to make its classes as flexible as possible, knowing that users of the toolkit may have different ideas...