Web Analytics Made Easy -
StatCounter getelementsbyselector - CodingForum

Announcement

Collapse
No announcement yet.

getelementsbyselector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getelementsbyselector

    http://home.hccnet.nl/m.wargers/getelementsbyselector/

    Test-page:
    http://home.hccnet.nl/m.wargers/gete...ctortest.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.

  • #2
    Hmm, have you seen this: <http://web-graphics.com/mtarchive/000832.php>
    liorean <[[email protected]]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

    Comment


    • #3
      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.

      Comment

      Working...
      X