Simon Willison’s Weblog

getNodesByType()

On gazingus.org, Flexible Node Retrieval introduces a new addition to the getElementsBy* family of javascript functions, getNodesByType. This general purpose function uses a callback function to “filter” the child nodes of a DOM element. It works a bit like PHP’s array_filter function. One for the toolbox.

This is getNodesByType() by Simon Willison, posted on 7th April 2003.

Next: Free Mike Hawash

Previous: Onyx Relicensed

Previously hosted at http://simon.incutio.com/archive/2003/04/07/getNodesByType