But what sense does that make?

I mean, you can use various ways of getting all elements (simplest is document.getElementsByTagName('*')), and the loop through them and look where the id attribute is not empty, but...