X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FGlobalScopeImpl.java;h=899b6722620e48ddd93f233179c55b7411513756;hb=2f625737b171102d495d31b0b91e1499430277dd;hp=e9b56809cfa2b833746f5af5ac5872004ea71057;hpb=3fce52759e3e8ad93a4ac224b10882d2e7901d4a;p=org.ibex.core.git diff --git a/src/org/xwt/js/GlobalScopeImpl.java b/src/org/xwt/js/GlobalScopeImpl.java index e9b5680..899b672 100644 --- a/src/org/xwt/js/GlobalScopeImpl.java +++ b/src/org/xwt/js/GlobalScopeImpl.java @@ -38,9 +38,18 @@ class GlobalScopeImpl extends JS.Scope { } else if(method.equals("encodeURIComponent")) { if(checkOnly) return Boolean.TRUE; return encodeURIComponent(args); + } else if(method.equals("stringFromCharCode")) { + if(checkOnly) return Boolean.TRUE; + return stringFromCharCode(args); } return super.callMethod(method,args,checkOnly); } + private Object stringFromCharCode(JS.Array args) { + char buf[] = new char[args.length()]; + for(int i=0;i 0 ? args.elementAt(0).toString() : ""; int radix = args.length() > 1 ? toInt(args.elementAt(1)) : 0;