Retrieving all DOM descendants
27th March 2003
First observation of the day: IE 5 for Windows doesn’t understand element.getElementsByTagName('*') to retrieve all descendants of an element in the DOM. element.all has the desired effect for that browser. So to retrieve all descendants in a way that will work on standards compliant browsers plus IE 5, the following seems to be the best bet:
var elements = element.all ? element.all : element.getElementsByTagName('*');
More recent articles
- Porting the Moebius 0.2B image inpainting model to run in the browser with Claude Code - 22nd June 2026
- sqlite-utils 4.0rc1 adds migrations and nested transactions - 21st June 2026
- Datasette Apps: Host custom HTML applications inside Datasette - 18th June 2026