I'm pulling in a google news feed, then trying to take out some mal-formatting by accessing the newly-created DOM elements.
var aryClassElements = document.getElementById('google-news').getElementsByTagName('div');
alert("Found "+aryClassElements.length+" divs in Google News");
But this alert shows 0. It hasn't found the newly-created DOM elements. Ack!
If I add an extraneous alert ("hello world") in between loading the google news feed and asking the dom for div elements in google-news, it finds 20 div elements. I assume the user response time to click "OK" lets the DOM update.
Is there some plain javascript (not jquery) that will accomplish the same result?
Tx!