Page 1 of 1

Determining if a tab has loaded

Posted: Thu Jun 18, 2015 4:21 pm
by awadley
I've got an interesting issue with Firefox where, when opening multiple Atrium tabs in quick succession (using Atrium.launchURL()), the first one isn't getting fully rendered when the second one opens because FF will only render things that are visible. This is causing some JQuery stuff to fail as the elements aren't loaded.

So, I need to launch a tab and then verify that it has rendered before launching another tab. launchURL() indicates that it returns a tab object. Is there a property or function on that object that I can check to see if it has loaded?

Thanks!

Re: Determining if a tab has loaded

Posted: Fri Jun 19, 2015 10:59 am
by Scott Klement
I haven't actually tried this, but it should work...

Atrium's tabs are really iframes. It should be possible to put something in the 'onload' event of the iframe that you open so that your code will run when the frame has loaded. You could use this to signal the 'parent' (where you are running the launch code) that things have loaded.

Does that help?