[dojo-contributors] Prototype-al simplicity

Bryan Forbes bryan at reigndropsfall.net
Fri Apr 7 13:00:49 EDT 2006


I agree that 65 functions in style.js is silly.  Here's what I propose 
(excuse the use of regexps for brevity):

style.js:
    getInnerWidth
    getInnerHeight
    getOuterWidth
    getOuterHeight
    setInnerWidth
    setInnerHeight
    setOuterWidth
    setOuterHeight
    getStyle
    setStyle
    getComputedStyle
    getStyleProperty
    toCameCase
    toSelectorCase
    show
    hide
    isShowing
    getShowing
    setShowing
    fixPathsInCssText

the rest should go in style/extras.js.  I haven't taken a close look at 
how much of "the rest" gets used in html.js, so I could be making a bad 
recommendation, but I think a lot of what's in style.js right now isn't 
core to what most people do with javascript and is just "helper" functions.

-Bryan

Paul Sowden wrote:
> If we count dom, style and html they make the biggest module by far.  
> I've listed the functions split into groups of logical functionality 
> at <http://dojotoolkit.org/~psowden/dojo.html.html>
>
> 65 functions in just style.js is massive!
>
> Onto dieting...
>
> The sheer number of functions in style is just silly, we need to drop 
> functions here.
>
> Some of the functions in DOM seem a little arcane, I have no qualms 
> about dropping ancestry functions for example.
>
> Some of the DOM functions in html.js seem superfluous.  The selection 
> functions can be pushed to a side module, probably the stylesheet 
> functions too.
>
> If there are opinions, please express, else work can go ahead with a 
> slimmed down proposal spec.
>
> --Paul Sowden
>
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
>



More information about the dojo-contributors mailing list