...

View Full Version : getelementsbyselector



mw22
02-16-2004, 11:51 PM
http://home.hccnet.nl/m.wargers/getelementsbyselector/

Test-page:
http://home.hccnet.nl/m.wargers/getelementsbyselector/getelementsbyselectortest.xhtml

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.

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

mw22
02-17-2004, 12:17 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum