Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-16-2004, 10:51 PM   PM User | #1
mw22
New Coder

 
Join Date: May 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
mw22 is an unknown quantity at this point
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.
mw22 is offline   Reply With Quote
Old 02-16-2004, 10:59 PM   PM User | #2
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Hmm, have you seen this: <http://web-graphics.com/mtarchive/000832.php>
__________________
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
liorean is offline   Reply With Quote
Old 02-16-2004, 11:17 PM   PM User | #3
mw22
New Coder

 
Join Date: May 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
mw22 is an unknown quantity at this point
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.
mw22 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:33 PM.


Advertisement
Log in to turn off these ads.