Hi Eric, thanks for your suggests! Well, now I answer all of your questions ;) - I named Element.ajaxRequest() in that way because by default it updates the element, but you can change the "onSuccess" function! - I've written String#len and String#getType because some newbies may not knows that attributes ;) - I've re-written Array#compact: now the control is not recursive (thanks)
Here is the code: http://tr.im/EBEP the Array#comapct starts at at line 128 Which methods do you suggest me to propose?? Thanks, Jacopo. On Nov 12, 11:15 am, Eric <lefauv...@gmail.com> wrote: > Hi, > > This has some nice ideas like Element.ajaxRequest() (which I would > have called Element.ajaxUpdate() since it is what it does :o) ), but > also some features I fail to see any utility to. > I.E., what's the point to use 'string'.len() instead of > 'string'.length? > Same thing for $('someElement').getType() instead of $ > ('someElement').nodeName > > Also, try to limit the impact on performances by avoiding tests in > loops when you can do them outside of the loop. > I.E, in your Array.compact version, you may replace : > compact: function(strict) { > return this.select(function(value) { > return strict === true ? value != null && value.strip() != '' : > value != null; > });} > ...by something like: > compact: function(strict) { > return this.select(strict === true ? function(value) { return > value != null && value.strip() != '' } : Prototype.K);} > > The procedure to submit contributions is described > here:http://www.prototypejs.org/contribute > You may propose some of yours (I'd recommend proposing only the more > interesting methods) once you've validated that they don't break the > test cases. > > HTH, > Eric > > On Nov 10, 10:07 am, Jacopo Andrea Nuzzi <jacopo.nu...@gmail.com> > wrote: > > > Hi Tobie, > > thanks for you suggest: here it is:http://tr.im/EBEP > > > Jacopo > > > On Mon, Nov 9, 2009 at 9:35 PM, Tobie Langel <tobie.lan...@gmail.com> wrote: > > > > Hi jacoz, > > > > Seems like your Array#add would benefit from using Array#splice. > > > >https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Object... > > > > Best, > > > > Tobie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---