FWIW, here''s the code I''m using to trigger the hlighlighting:
window.onload = function() {
highlightFormElements();
if ($(''successMessages'')) {
new Effect.Highlight(''successMessages'', {startcolor:
''#ffff00'', endcolor: ''#ffffcc''});
}
if ($(''errorMessages'')) {
new Effect.Highlight(''errorMessages'', {startcolor:
''#ffff00'', endcolor: ''#ffffcc''});
}
}
Everything seems to work fine in Firefox and Safari on OS X.
Matt
On Aug 10, 2005, at 2:47 PM, Matt Raible wrote:
> I''m trying to use Canoo WebTest (based on HtmlUnit) to test my
> webapp after integrating scriptaculous. While my test passed, I
> get a nice long exception message which barely makes any sense (see
> below).
>
> I found I could get rid of this message by commenting out line 114
> of effects.js:
>
> 114 this.timeout = setTimeout(this.loop.bind(this), 10);
>
> Any idea of what might be causing this?
>
> Thanks,
>
> Matt
>
> [canoo] [appfuse-tapestry] ERROR [Thread-2] Window.run(245) |
> Caught exception in Window.setTimeout()
> [canoo] ======= EXCEPTION START =======> [canoo] EcmaError:
lineNumber=[1] column=[72] lineSource=
> [function GargoyleWrapper0()
> {org.mozilla.javascript.InterpretedFunction@f78a5] name=
> [SyntaxError] sourceName=[Wrapper definition for Window.setTimeout
> ()] message=[illegal character] errorObject=[SyntaxError: illegal
> character]
> [canoo] com.gargoylesoftware.htmlunit.ScriptException: illegal
> character
> [canoo] at
> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute
> (JavaScriptEngine.java:280)
> [canoo] at
> com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossibl
> e(HtmlPage.java:709)
> [canoo] at
> com.gargoylesoftware.htmlunit.javascript.host.Window$1.run
> (Window.java:241)
> [canoo] at java.lang.Thread.run(Thread.java:552)
> [canoo] Enclosed exception:
> [canoo] SyntaxError: illegal character (Wrapper definition for
> Window.setTimeout(); line 1)
> [canoo] at
> org.mozilla.javascript.NativeGlobal.constructError
> (NativeGlobal.java:597)
> [canoo] at
> org.mozilla.javascript.TokenStream.reportSyntaxError
> (TokenStream.java:1324)
> [canoo] at org.mozilla.javascript.TokenStream.getToken
> (TokenStream.java:1302)
> [canoo] at org.mozilla.javascript.Parser.memberExprTail
> (Parser.java:1213)
> [canoo] at org.mozilla.javascript.Parser.memberExpr
> (Parser.java:1204)
> [canoo] at org.mozilla.javascript.Parser.unaryExpr
> (Parser.java:1115)
> [canoo] at org.mozilla.javascript.Parser.mulExpr
> (Parser.java:1062)
> [canoo] at org.mozilla.javascript.Parser.addExpr
> (Parser.java:1045)
> [canoo] at org.mozilla.javascript.Parser.shiftExpr
> (Parser.java:1032)
> [canoo] at org.mozilla.javascript.Parser.relExpr
> (Parser.java:1015)
> [canoo] at org.mozilla.javascript.Parser.eqExpr(Parser.java:
> 1002)
> [canoo] at org.mozilla.javascript.Parser.bitAndExpr
> (Parser.java:991)
> [canoo] at org.mozilla.javascript.Parser.bitXorExpr
> (Parser.java:980)
> [canoo] at org.mozilla.javascript.Parser.bitOrExpr
> (Parser.java:969)
> [canoo] at org.mozilla.javascript.Parser.andExpr
> (Parser.java:957)
> [canoo] at org.mozilla.javascript.Parser.orExpr(Parser.java:
> 945)
> [canoo] at org.mozilla.javascript.Parser.condExpr
> (Parser.java:928)
> [canoo] at org.mozilla.javascript.Parser.assignExpr
> (Parser.java:909)
> [canoo] at org.mozilla.javascript.Parser.expr(Parser.java:898)
> [canoo] at org.mozilla.javascript.Parser.statementHelper
> (Parser.java:791)
> [canoo] at org.mozilla.javascript.Parser.statement
> (Parser.java:387)
> [canoo] at org.mozilla.javascript.Parser.parseFunctionBody
> (Parser.java:167)
> [canoo] at org.mozilla.javascript.Parser.function
> (Parser.java:271)
> [canoo] at org.mozilla.javascript.Parser.parse(Parser.java:
> 121)
> [canoo] at org.mozilla.javascript.Context.compile
> (Context.java:2053)
> [canoo] at org.mozilla.javascript.Context.compile
> (Context.java:2006)
> [canoo] at org.mozilla.javascript.Context.compileReader
> (Context.java:899)
> [canoo] at org.mozilla.javascript.Context.evaluateReader
> (Context.java:817)
> [canoo] at org.mozilla.javascript.Context.evaluateString
> (Context.java:784)
> [canoo] at
> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute
> (JavaScriptEngine.java:272)
> [canoo] at
> com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossibl
> e(HtmlPage.java:709)
> [canoo] at
> com.gargoylesoftware.htmlunit.javascript.host.Window$1.run
> (Window.java:241)
> [canoo] at java.lang.Thread.run(Thread.java:552)
> [canoo] == CALLING JAVASCRIPT => [canoo] function
GargoyleWrapper0()
> {org.mozilla.javascript.InterpretedFunction@f78a5
> [canoo] }
> [canoo] ======= EXCEPTION END =======>
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>