ok i try to explain my goal.
we are in the world of advertisement, i build for a client a google adsense script, this script need to know how many targets the webpages has.
normally its a simple part, wait for dom ready, select all targets, count them, request advertisements.
now we can't wait for dom ready because of performance issues, the script have a small "do..while" that waits for the (hardcoded dom-ids) elements. if its present then add the advertisement to the element (this happens all before dom ready, so its much faster!)
the problem is if the webpage have different targets, at page load we have 5 targets and after a reload we have only 3 or less… at this moment i have no informations about how many targets i have, i can't count them.
so my idea was to read the raw source code and explode all my target elements and count them there
(puh hard work in english i hope all can understand my crazy school english )