This is because you are operating on an element collection.

getChildren (and lots of others) return a collection ('Elements' in 
MooTools) which is an array-like-object containing the elements. If you 
execute an Element method on it (setStyle, set.. or getPosition) it will 
call the methods on all elements in the array. If those methods have return 
values other than the element itself, they will be in-place instead of the 
element.

Example:
var elements = element.getChildren();
// [p, span]
elements.set('text', 'test');
// returns again, [p, span]
elements.getStyle('color');
// returns an array [#fff, #000] for example.

Reply via email to