document.getElements() support

How well supported is the document.getElements() function. Additionally, is there a javascript reference page that has detailed browser support information somewhere. I usually use the mozilla docs, but I was wondering if there is something better.

I actually can't find any documentation on document.getElements() but when I do things like:

document.getElements("div a");

It works great in chrome, ff, safari, ie8 and ie6-9 via IETester. I think IETester may use the same javascript engine for all browsers though (not sure about that).



There is no such thing as document.getElements... I'll bet your coding in Jsfiddle and don't realize that the mootools lib is included ;)

Have a look:

Answer is a pretty good resource for things like this (though not fully updated on IE9, as it's a moving target at the moment).

Note: they don't have an entry for document.getElements() specifically (are you sure you're getting this name right?), but in general it's a pretty complete reference, here's an example - check out .querySelectorAll() (which does what you describe...).


Probably you are looking for querySelecterAll function:

elementList = parentNode.querySelectorAll(selectors);

This is most handy and much usable function.

To check how your requested feature is supported among browsers you can use "Can I Use" site:

On this site you can check not only functions but HTML attributes and CSS capabilities too


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.