[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: KHTML and onLoad
From:       Tobias Anton <TA () ESC-Electronics ! de>
Date:       2004-09-27 10:03:33
Message-ID: 200409271303.50751.TA () ESC-Electronics ! de
[Download RAW message or body]

On Sonntag, 26. September 2004 13:25, Sébastien Richard wrote:

> If I run this with kdedebug enabled, I can see that I get the signal
> completed()  BEFORE the HTTP GET query for page3.html.
> And I receive the signal completed() not the signal
> completed(pending=true). Is this a bug ?

Don't think so. Provided that page1.html and page2.html are loaded completely, 
KHTML correctly assumes that the page is finished loading. The semantics of 
the JavaScript "onLoad"-listener is identical to that of the QT-signal 
"completed()". These two events happen virtually synchronously and they don't 
depend on each other's result. How should they? Imagine for example the 
following function being called in onLoad:

function loadFramesLater()
{
	window.setTimeout("loadFrames", 1000);
}

In that case, completed() would adequately be emitted on load, but a second 
later, we'd have to "revoke" it, because then, we're in progress of loading 
again.

> Is there any other variable that
> could indicate me that the loading is not finished ?

It should work with a little cross-frame scripting. You could for example put 
onLoad="parent.setCompleted()" in the body of page3.html. Don't know what to 
tweak additionally to get it working, though.

Cheers
Tobias

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic