NodeList to an array first:
var elements = .slice.call(table.tBodies.childNodes);
and then call
sort cannot handle array-like objects. This is probably because
NodeList does not provide any methods to change the list, but
sort sorts the array in-place.
Update: For more information, from the specification:
Perform an implementation-dependent sequence of calls to the [[Get]] , [[Put]], and [[Delete]] internal methods of obj.
NodeLists don't have these internal methods. But this is really just an assumption. It could also be that this is implementation dependent.