#195 new
Kai Hackemesser

setting window.location = ... hangs

Reported by Kai Hackemesser | June 13th, 2012 @ 03:18 PM

Using Rhino 1.7R3 with env.rhino.1.2.js.

The problem: When the loaded web page contains a script having an endless timer loop (setTimeout calling a method that itself sets another timer), the following call is not returning:

context.evaluateString(scope, "window.location='" + url + "'", "", 0, null);

As an example here's a script block of the file I tried to load:

<script type="text/javascript">

var observer;

fail("bad luck");

function fail(message) {
    if (typeof observer == 'undefined') {
        console.info("fail - wait for observer");
        setTimeout(function() {
            fail(message);
        }, 1000);
        return;
    }
    observer.notify();
}

</script>

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket

Pages