spudly.shuoink.com

the best way to predict the future is to implement it

Entries Comments


the ultimate getElementsBy*: Object.getElementsWhere()

1 December, 2007 (21:14) | JavaScript | 3 comments

Update: for compatibility, Object.getElementsWhere(”condition”) is being changed to getElementsWhere(node, condition) where node is the node to search in.
I’ve looked a lot lately at the getElementsByClass() function and other getElementsBy functions, but they all seemed rather inadequate to me.
I rewrote the function about three times before I figured out what to do. What I really wanted [...]