Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 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
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    liorean <[lio@wg]>
    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

  • #3
    New Coder
    Join Date
    May 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •