Does easyXDM wait for whenReady before writing its iframe?

205 views
Skip to first unread message

Jim Spath

unread,
May 3, 2011, 11:46:43 AM5/3/11
to easyxdm
I was wondering if easyXDM waits until domIsReady before writing its
iframe to the page.

I was asked to speed up the loading of our application, so I moved
some of our code before domIsReady would be true ... but that's all
for naught if easyXDM is going to wait on its own.

Thanks!
Jim

Øyvind Sean Kinsey

unread,
May 3, 2011, 11:55:59 AM5/3/11
to eas...@googlegroups.com
On Tue, May 3, 2011 at 5:46 PM, Jim Spath <jsp...@pangeamedia.com> wrote:
I was wondering if easyXDM waits until domIsReady before writing its
iframe to the page.

Yes, all interaction with the DOM is deferred until DOMContentLoaded or similar.
If you set lazy:true in the transports configuration, then it will even be deferred to when the first request happens.

Sean

Jim Spath

unread,
May 3, 2011, 11:59:53 AM5/3/11
to easyxdm
On May 3, 11:55 am, Øyvind Sean Kinsey <oyv...@kinsey.no> wrote:
> On Tue, May 3, 2011 at 5:46 PM, Jim Spath <jsp...@pangeamedia.com> wrote:
> > I was wondering if easyXDM waits until domIsReady before writing its
> > iframe to the page.
>
> Yes, all interaction with the DOM is deferred until DOMContentLoaded or
> similar.

Yeah, I assumed that was the case.

In my situation we actually run our application within the iframe that
easyXDM creates ... so we were looking for ways to start the loading
process sooner.

But I kind of figured easyXDM would wait until the DOM is ready.

- Jim

Øyvind Sean Kinsey

unread,
May 3, 2011, 12:03:04 PM5/3/11
to eas...@googlegroups.com
On Tue, May 3, 2011 at 5:59 PM, Jim Spath <jsp...@pangeamedia.com> wrote:
On May 3, 11:55 am, Øyvind Sean Kinsey <oyv...@kinsey.no> wrote:
> On Tue, May 3, 2011 at 5:46 PM, Jim Spath <jsp...@pangeamedia.com> wrote:
> > I was wondering if easyXDM waits until domIsReady before writing its
> > iframe to the page.
>
> Yes, all interaction with the DOM is deferred until DOMContentLoaded or
> similar.

Yeah, I assumed that was the case.

In my situation we actually run our application within the iframe that
easyXDM creates ... so we were looking for ways to start the loading
process sooner.

Really? That breaks one of the golden rules for third-party developers - never slow down the hosting page. 
If you start rendering iframes with all its resources as soon as possible, then stuff like CSS, images and such might be delayed rendering the users experience crippled...
This doesn't look good for either of you, the page or you as a provider.

Jim Spath

unread,
May 3, 2011, 12:12:39 PM5/3/11
to easyxdm
Good thing easyXDM prevented me from doing that then, huh :)

There is a down side to waiting until the document is ready ... your
app can appear to load slow if other things on the page are preventing
it from being "ready". Don't get me wrong, I totally understand your
point and I designed our app to behave according to the "golden
rule" ...

But it's tough to explain these things to business folks who simply
want the app to appear sooner.

Anyways ... you've satisfied my questions for now, and since easyXDM
is a critical part of our code, we'll live with it.

Thanks,
Jim

Sahan Dissanayake

unread,
Jun 23, 2016, 12:33:44 PM6/23/16
to easyxdm
Anything new on this ??
Reply all
Reply to author
Forward
0 new messages