Does Konq synchronize functions when eval operator is used?

David Joham djoham at yahoo.com
Mon Mar 3 06:45:40 GMT 2003


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/




More information about the kfm-devel mailing list