Hmm... Should I raise a bug about getting that documented, then? If I get a chance, I'll have a crack at updating the docs myself, but it's good to have the issue raised in any case. :)
Barry van Oudtshoorn http://barryvan.com.au/ [email protected] 2011/11/2 Arian Stolwijk <[email protected]> > Ah, you're right, Array methods are more important than element methods. > It's the same thing with .clone for example, elements.clone() will try to > clone the array, instead of each element. > > This is probably because it is easier to loop over each element and use > the element method than the other way around. > > > On Wed, Nov 2, 2011 at 3:52 AM, Barry van Oudtshoorn < > [email protected]> wrote: > >> Hi all, >> >> The obligatory jsFiddle: http://jsfiddle.net/barryvan/7B7uL/ >> >> So, in a nutshell: >> - Calling "set('disabled', true)" on Elements works perfectly. >> - Calling "erase('disabled')" on Elements doesn't work >> - Calling "erase('disabled')" on each Element within the Elements works >> perfectly >> >> To me, this looks like a bug -- is it? If it is, I'll report it on >> GitHub. My guess is that it's because Elements.erase is actually >> Array.erase, rather than Element.erase for each member. Which should take >> precedence isn't very clear -- the docs just say "The Elements class allows >> Element methods to work on an Elements array, as well as Array Methods.". >> >> Thoughts? >> >> Regards, >> >> - Barry >> >> -- >> Barry van Oudtshoornwww.barryvan.com.au >> >> Not sent from my Apple πPhone. >> >> >
