I need to find out when the iframe in bookmarklet script below has loaded, so i can access the DOM in it. As it is now, when I try to access the iframe DOM, it doesn't work because the iframe is still loading its src.
The reason I'm doing this is that the page I'm trying to scrape has an unloaded ajax tab, so I'm grabbing the ajax url and using it as the src property of the dynamically generated iframe. Then i scrape the content of the iframe
var thebody = document.getElementsByTagName('body');
var my_iframe = document.createElement('iframe');
my_iframe.src = 'http://asite.com/apage.php';
// access the iframe DOM