Does Konq synchronize functions when eval operator is used?

David Joham djoham at yahoo.com
Fri Mar 7 20:37:20 GMT 2003


Hi Dirk,

Thanks for your reply. In my case, I'm actually using onLoads from IFRAMES that I create using DOM
to recreate this problem. setTimeout was an easier way to demonstrate the problem to the mailing
list.

As I dug a little further into the problem, I found a bug in my code that exposed a difference in
behavior between Konq, Moz and Opera. In one of my functions, I used the line of code:

guid = "<somecode>"

without putting the operator var in front of it. This puts guid into a global scope. Later, in my
onload event handler, I used the same variable name. Oddly, Moz and Opera would not overwrite the
global value of guid, but Konq would. That was the real problem that I was seeing. In this case, I
actually think Konq's behavior was correct and Moz/Opera were wrong. Once I added the var operator
in front of the variable above (moving guid to a local scope of that function), Konq seems to sync
things the way I would expect.

Thanks for looking into this.

Best regards,

David

--- Dirk Mueller <mueller at kde.org> wrote:
> On Son, 02 M?r 2003, David Joham wrote:
> 
> > The question still stands however. Is this a bug in Konq or is there a way to get the calls to
> > these functions synchronized that I'm missing?
> 
> well, the most obvious way of synchronizing it is not using setTimeout, but 
> instead just executing it one after the other. 
> 
> Other than that its probably a bug, if indeed all other browsers behave the 
> way you describe. It will probably work fine as long as you don't use 
> alert(), but only methods that don't block. 
> 
> -- 
> Dirk

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/




More information about the kfm-devel mailing list