Simon Willison’s Weblog

getElementsByTagName(). Dean Edwards rolls a hand-rolled getElementsByTagName function for use with DOM fragments (which don’t provide the method). His code is a nice example of a tightly written tree walker using the low level DOM API.