Skip to content

Commit

Permalink
[#2583 state:fixed-in-qa]Catch JS exceptions in getJSValue and return…
Browse files Browse the repository at this point in the history
… empty string like iOS
  • Loading branch information
billdawson committed Dec 15, 2010
1 parent a7e63f5 commit c84d12e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void evalJS(String code)
private String returnValue;
public String getJSValue(String expression)
{
String code = "javascript:_TiReturn.setValue((function(){return "+expression+"+\"\";})());";
String code = "javascript:_TiReturn.setValue((function(){try{return "+expression+"+\"\";}catch(ti_eval_err){return '';}})());";
Log.d(LCAT, "getJSValue:"+code);
webView.loadUrl(code);
try {
Expand Down

0 comments on commit c84d12e

Please sign in to comment.