Menu

#52 window.setTimeout not defined

closed
None
5
2012-10-21
2003-01-27
No

It appears window.setTimeout() has not been
implemented in HtmlUnit 1.1. See
the following HTML and stacktrace.

<html>
<body>
<script language="JavaScript">
window.setTimeout('alert("Yo!")',0);
</script>
</body>
</html>

com.gargoylesoftware.htmlunit.ScriptException:
undefined is not a function.
at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngin
e.execute(JavaScriptEngine.java:162)
at
com.gargoylesoftware.htmlunit.html.HtmlPage.executeS
criptTagsIfNeeded(HtmlPage.java:748)
at
com.gargoylesoftware.htmlunit.html.HtmlPage.initialize
(HtmlPage.java:102)
at com.gargoylesoftware.htmlunit.WebClient.getPage
(WebClient.java:359)
at com.gargoylesoftware.htmlunit.WebClient.getPage
(WebClient.java:238)
at com.gargoylesoftware.htmlunit.WebClient.getPage
(WebClient.java:180)
at Test.main(Test.java:16)

I've done some research on the topic and it appears that
Rhino does not support
the function and that it is up to Rhino's container to
handle it.

Note that the page works fine in IE 5.5 and Netscape
4.7.

Discussion

  • Brad Clarke

    Brad Clarke - 2003-02-19

    Logged In: YES
    user_id=257129

    We're having the same problem. Has there been any progress
    on this?

     
  • Mike Bowler

    Mike Bowler - 2003-07-18

    Logged In: YES
    user_id=46756

    Fixed.

     

Log in to post a comment.