Quote:
It is a little more complicated than that sometimes because getElementsByClassName functions exist, their syntax and capabilities can still be tested against the standard though to tell whether or not they're up to the situation at hand. If they are, might as well use them, if not - go for your own custom function.
That way your code will benefit from the efficiency of the native and/or existing function, while still being able to execute in the absence of either.
Do you suppose it's worth it to check, though? If you have to make the function anyway, you might as well just use it. But then, perhaps the native function would work better.