[dojo-contributors] Prototype-al simplicity

James Burke jburke at dojotoolkit.org
Fri Apr 7 14:35:36 EDT 2006

I personally like that style. It does save some space, but it is a
little more error-prone (be sure to test in MSIE to make sure you
don't leave a trailing comma after the last property definition). It
also makes finding prototype stuff a little weirder:

myclass.prototype = {
  method1: function() {}

If you search for method1 in a very large prototype definition, unless
you scroll up, you may  not realize that it is a prototype method. But
I'm still up for using that style.


On 4/7/06, Bill Keese <bill at dojotoolkit.org> wrote:
> One small thing is to declare all the functions like they are part of an
> object (or part of a package?), like this:
> dojo.style = {
>         getPixelValue: function() { ... },
>         getNumericStyle: function() { ... },
> };
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors

More information about the dojo-contributors mailing list