<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 214: Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/</link><description>Recent changes to 214: Provide an overload for JavaScriptEngine.callFunction that can always throw exception</description><atom:link href="https://sourceforge.net/p/htmlunit/feature-requests/214/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 22 Jan 2014 02:28:57 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/htmlunit/feature-requests/214/feed.rss" rel="self" type="application/rss+xml"/><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=25#dfcd</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, Is there any progress on this one?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Wed, 22 Jan 2014 02:28:57 -0000</pubDate><guid>https://sourceforge.netb2c10c242d5f45cdfc0bc0e2be3c46d7cdd9f484</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=25#0979</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Yes, in second test case should be configured as&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;webClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getOptions&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;setThrowExceptionOnScriptError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And given this configuration I need a way to make the first test case pass.&lt;/p&gt;
&lt;p&gt;Thanks for looking into it.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Mon, 30 Sep 2013 22:57:06 -0000</pubDate><guid>https://sourceforge.net063be6d8349e64e433839d0b578855f15e45b0c7</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=250#d35f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I guess that you meant using&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;webClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getOptions&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;setThrowExceptionOnScriptError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;in the second test before loading the HTML code.&lt;/p&gt;
&lt;p&gt;Interestingly, this test has been showing that method click() is supported in real FF on any element at least since version 10 (but not in 3.6) what is not yet the case in HtmlUnit. I'm working on a fix.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc Guillemot</dc:creator><pubDate>Fri, 27 Sep 2013 08:17:25 -0000</pubDate><guid>https://sourceforge.net3a8d9ea035278acec72560f5fbd5d45f3344ca03</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=250#34e5</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Concerning the first test: &lt;/p&gt;
&lt;p&gt;it fails on&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;assertTrue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;se&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getCause&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;instanceof&lt;/span&gt; &lt;span class="n"&gt;JavaScriptException&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;because the exception's cause is an EcmaError and not a JavaScriptException. This seems correct for me if you refer to the JavaDoc of JavaScriptException &amp;gt;Instances of this class are thrown by the JavaScript 'throw' keyword"&amp;lt;.&lt;/p&gt;
&lt;p&gt;If you change for instance&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;doesntExists&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;to &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;throw&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;boom&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;then the test is green.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc Guillemot</dc:creator><pubDate>Fri, 27 Sep 2013 07:38:18 -0000</pubDate><guid>https://sourceforge.netc5c878da4ef36c3d458ce5ec18f78a37008eb788</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=25#1b6f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Also, this is the supplemental test case that we need to be sure not broken:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;Test&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nx"&gt;Alerts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;foo&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="bp"&gt;void&lt;/span&gt; &lt;span class="nx"&gt;browserCallbackDoesntLeakExceptions&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;foo&amp;lt;/title&amp;gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;function onload() {&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;  var btn = document.getElementById('button1');&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;  btn.onClick = function() { doesntExists.call(); };&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;  btn.click();&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;  alert('foo');&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;}&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;lt;/script&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;lt;div id='button1' /&amp;gt;&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;loadPageWithAlerts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Thu, 26 Sep 2013 01:49:54 -0000</pubDate><guid>https://sourceforge.neta29a4bfb80b996ca40daa0ce32fccf204f2448e6</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=25#c10e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I don't have much familiarity with htmlunit so I wrote it looking at GWT usage and some tests inside htmlunit. I don't have a htmlunit development environment setup so this may not be even compiling but here it is:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nd"&gt;@Test&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;callFunctionThrowsException&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;foo&amp;lt;/title&amp;gt;&amp;lt;script&amp;gt;\n&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;window.throwsSomeException = function(){ doesntExists.call(); };&amp;quot;&lt;/span&gt;
    &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;/script&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;HtmlPage&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;loadPage&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;Window&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getEnclosingWindow&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;getScriptObject&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Function&lt;/span&gt; &lt;span class="n"&gt;jsFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Function&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ScriptableObject&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getProperty&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;throwsSomeException&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;JavaScriptEngine&lt;/span&gt; &lt;span class="n"&gt;jse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;getWebClient&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;getJavaScriptEngine&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;jse&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;callFunction&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jsFunction&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Object&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]);&lt;/span&gt;
    &lt;span class="c1"&gt;// This would be a breaking change because callFunction doesn't do the &lt;/span&gt;
    &lt;span class="c1"&gt;// the reporting of errors via listener; instead caller does.&lt;/span&gt;
    &lt;span class="c1"&gt;// This may require larger refactoring on htmlunit  so that's why you&lt;/span&gt;
    &lt;span class="c1"&gt;// want to overload instead:&lt;/span&gt;
    &lt;span class="c1"&gt;// or jse.callFunction(&amp;lt;.....&amp;gt;, true /* throw on exception*/);&lt;/span&gt;
    &lt;span class="c1"&gt;// or jse.callFunction2(&amp;lt;.....&amp;gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// or something similar&lt;/span&gt;
    &lt;span class="n"&gt;fail&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Should have failed&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ScriptException&lt;/span&gt; &lt;span class="n"&gt;se&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;assertTrue&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;se&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getCause&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="n"&gt;JavaScriptException&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Thu, 26 Sep 2013 01:07:57 -0000</pubDate><guid>https://sourceforge.net7f5b8c6e79948fe7cc3445a17b9159d6e4b60afe</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=250#1094</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm aware of GWT's modes. Thanks.&lt;/p&gt;
&lt;p&gt;Could you provide the unit test(s) illustrating what you are looking for? This would ensure that we're talking about the same thing and this is absolutely necessary for a new feature in HtmlUnit.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc Guillemot</dc:creator><pubDate>Wed, 25 Sep 2013 06:30:48 -0000</pubDate><guid>https://sourceforge.net11a48c4023daaa3a1dd6335fdca716ff1dac0bec</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=25#9c07</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Let me try to explain in a different way.&lt;/p&gt;
&lt;p&gt;GWT has two modes.&lt;/p&gt;
&lt;p&gt;One is script mode (a.k.a. production mode) where we output javascript code from java that can be executed as a regular js in browser. Thinking this part alone, setting throwExceptionOnScriptError to false makes perfect sense and everything will work as expected. No problems here that I'm aware of.&lt;/p&gt;
&lt;p&gt;The second mode is called dev mode (a.k.a hosted mode). This mode is pretty complicated but in very basic terms, GWT launches a java process that executes GWT code and interfaces with javascript and DOM via a plugin inside the browser. This plugin is responsible for executing any javascript snippet requested by the GWT java process. To do that, GWT injects a function to page and plugin calls this function to evaluate the request javascript from the java process.&lt;/p&gt;
&lt;p&gt;To emulate this in htmlunit GWT uses the JavaScriptEngine.callFunction method and expects it to throw exception if the underlying code throws exception so that it can translate and send it back to java process.&lt;br /&gt;
This is one direction of communication; there is also the other direction. Javascript code on the browser may call the java code so the plugin needs to intercept and forward those calls to java process.&lt;/p&gt;
&lt;p&gt;All of this is a synchronous re-entrant operation. So java can call javascript, javascript can call java, and so on.&lt;br /&gt;
I'll try to illustrate an example call stack:&lt;/p&gt;
&lt;p&gt;java process &lt;br /&gt;
 -&amp;gt; JavascriptEngine.callFunction&lt;br /&gt;
     -&amp;gt; some_js_code&lt;br /&gt;
         -&amp;gt; GWT's ScriptableObject&lt;br /&gt;
             -&amp;gt; java process&lt;br /&gt;
                 -&amp;gt; JavascriptEngine.callFunction&lt;br /&gt;
                    .....&lt;/p&gt;
&lt;p&gt;As you can see, there are multiple on going calls, it would be likely possible but would be much more complex and error prone to use a central exception listener and try to associate exceptions with specific calls.&lt;/p&gt;
&lt;p&gt;When a real browser plugin calls a function inside the page, the plugin will receive the exception as a return value or via catch block. With current APIs in htmlunit, I'm not aware of anyway to easily mimic that and that is why I suggested this change. From an outsider's perspective, it makes sense to me let JavaScriptEngine to be able to throw exceptions independent from the options that are set in webclient. Easiest and least impactful change I found to achieve this is to provide an overload to callFunction.&lt;/p&gt;
&lt;p&gt;Please let me know if you have other suggestions.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Wed, 25 Sep 2013 03:50:46 -0000</pubDate><guid>https://sourceforge.net218b23dd027efdcd6d76d29eb10cef77860e5e4a</guid></item><item><title>#214 Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/?limit=250#75c1</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I still don't understand the issue. If you want HtmlUnit to behave like "real" browsers, you have to set throwExceptionOnScriptError to false. In this case, if you need the exception, you have to use a JavaScriptErrorListener. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc Guillemot</dc:creator><pubDate>Tue, 24 Sep 2013 07:48:06 -0000</pubDate><guid>https://sourceforge.net5127e57b1c7382ca59aaeeca6d04c9da21264cc6</guid></item><item><title>Provide an overload for JavaScriptEngine.callFunction that can always throw exception</title><link>https://sourceforge.net/p/htmlunit/feature-requests/214/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;callFunction methods in JavaScriptEngine may throw an exception or not based on throwExceptionOnScriptError option provided to WebClient.&lt;/p&gt;
&lt;p&gt;This is a problem with GWT because we can really mimic the browser behavior. If the throwExceptionOnScriptError is false, htmlunit works like browser and continues working as exceptions appear. However GWT also relies on JSE.callFunction for development mode which swallows the exception if the option is set to false; which would not be the case in a browser.&lt;/p&gt;
&lt;p&gt;If we choose to set the option true for web mode, this time it causes other problems. For example, the caller of btn.click will receive any exception thrown from the handler unlike what happens in a real browser. So it looks like we really need to set throwExceptionOnScriptError to false even in dev-mode.&lt;/p&gt;
&lt;p&gt;The simplest solution looks like providing an alternative for 'callFunction' that will throw exception independent of the option provided to WebClient.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goktug</dc:creator><pubDate>Tue, 24 Sep 2013 00:02:30 -0000</pubDate><guid>https://sourceforge.neta7657325be3b8c3d0ea09b7d97c675a40fbcdadf</guid></item></channel></rss>