View Full Version : getelementsbyselector

02-16-2004, 10:51 PM


Note that the getelementsbyselector button should work in both ie and mozilla, except for namespace and prefix (which only work in Mozilla)

Although, I've disabled it in most cases, the insertrule button could crash ie with invalid selectors (at least invalid for ie). so beware!

The largscaletest button is a more thorough comparison of the element array which is collected, between the browser method (which the browser collects) and the getelementsbyselector method.
This only works in Mozilla.

Any comments, questions or bug reports are welcome.

02-16-2004, 10:59 PM
Hmm, have you seen this: <http://web-graphics.com/mtarchive/000832.php>

02-16-2004, 11:17 PM
Yes, some while back I needed a getelementsbyselector function and instantly I thought of Simon Willison's one.
But his doesn't support the > combinator for example, which I needed. So then I started building my own one.

It should support all known combinators ( >~+) and most pseudo-classes I know of (and some I don't know) , except for :visited, :link, :active, :focus, :hover, :enabled, :indeterminate.
Some other pseudo classes are most likely partly/wrongly supported.