if (Log.on) Log.log(Proxy.class, script);
}
- JS.CompiledFunction scr = JS.parse("PAC script at " + url, 0, new StringReader(script));
+ JS.CompiledFunction scr = JS.parse("PAC script at " + url, 0, new StringReader(script));
scr.call(new JS.Array(), proxyAutoConfigRootScope);
return (JS.Callable)proxyAutoConfigRootScope.get("FindProxyForURL");
} catch (Exception e) {
if (Log.on) {
Log.log(Platform.class, "WPAD detection failed due to:");
if (e instanceof JS.Exn) {
- try {
- org.xwt.js.JS.Array arr = new org.xwt.js.JS.Array();
- arr.addElement(((JS.Exn)e).getObject());
- // FIXME
- //XWT.recursivePrintObject.call();
- } catch (Exception e2) {
- Log.log(Platform.class, e);
- }
- }
+ try {
+ org.xwt.js.JS.Array arr = new org.xwt.js.JS.Array();
+ arr.addElement(((JS.Exn)e).getObject());
+ // FIXME
+ //XWT.recursivePrintObject.call();
+ } catch (Exception e2) {
+ Log.log(Platform.class, e);
+ }
+ }
else Log.log(Platform.class, e);
}
return null;
if (Log.on) Log.log(Authorization.class, "displaying proxy authorization dialog");
MessageQueue.add(new Message() {
public void perform() {
- Box b = new Box("org.xwt.builtin.proxy_authorization", null);
+ Box b = new Box();
+ Template.getTemplate("org.xwt.builtin.proxy_authorization", null).apply(b, null, null, null, 0, 0);
b.put("realm", realm);
b.put("proxyIP", proxyIP);
}
public static class ProxyAutoConfigRootScope extends JS.Scope {
- public ProxyAutoConfigRootScope() { super(null); }
+ public ProxyAutoConfigRootScope() { super(null); }
- // FIXME: needs "standard objects"
+ // FIXME: needs "standard objects"
public Object get(Object name) {
if (name.equals("isPlainHostName")) return isPlainHostName;