Does Konq synchronize functions when eval operator is used?

David Joham djoham at yahoo.com
Mon Mar 3 07:05:40 GMT 2003


Well, after reading my Email it became painfully clear to me that it is too late at night to write
good bug reports and that I wasn't clear at all with my description, or my analysis of the
problem. Sorry about that. 

The real problem doesn't seem to be the Eval operator, but that Konq doesn't synchronize
JavaScript calls when threads are used to call the same function. In the case of my recreation,
the thread is caused by window.setTimeout. In the case of my code, the thread is caused by an
onload event of an IFRAME.

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?

BTW: I tried this in Konq 3.1 and in code from HEAD from maybe a week ago.

Sorry again for the crummy mail. /me goes to bed

David

--- David Joham <djoham at yahoo.com> wrote:
> 
> Hello,
> 
> I'm running into a problem with Konq and I want to know if what I'm seeing is really a bug or
> not
> before I send it over to bugzilla.
> 
> Basically, what seems to be happening is that Konq doesn't synchronize javascript calls when
> they
> are called using the eval operator. Running the following code in Konq gives you two alert boxes
> that say "start" before any alert box that says "end" is displayed. I would expect the behavior
> to
> be "start" -> "end" -> "start" -> "end". In fact, this is what I do see in mozilla.
> 
> Here's the code:
> 
> <html>
>     <body>
>         <form>
>             <input type="button" onclick="go()" value="go"><br>
>         </form>
>     </body>
> </html>
> 
> <script type="text/javascript">
>     function go() {
>         window.setTimeout("foo()", 1);
>         window.setTimeout("foo()", 2);
>     }
>     
>     function foo() {
>         alert("start");
>         var i = "string";
>         for (intLoop = 0; intLoop < 100; intLoop++) {
>             i = i + intLoop;
>         }
>         alert("end");
>     }
> </script>
> 
> 
> If this is indeed a bug, does anyone have any suggestions for how I could get the eval function
> to
> be synchronized? I have to use the eval function because in my code, I don't know the name of
> the
> function being called until run time.
> 
> Thanks in advance.
> 
> David
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/

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




More information about the kfm-devel mailing list