- public Object get(Object key) throws JSExn {
- if (super.has(key)) return super.get(key);
- if (key.equals("ibex")) return ibex;
- if (key.equals("")) return ibex.get("");
- if (key.equals("static")) return myStatic;
- return super.get(key);
+ public JS get(JS key) throws JSExn {
+ if(JSU.isString(key)) {
+ String s = JSU.toString(key);
+ // JS:FIXME This is a hack
+ if (super.get(key) != null) return super.get(key);
+ if (s.equals("ibex")) return ibex;
+ if (s.equals("")) return ibex.get(key);
+ if (s.equals("static")) return myStatic;
+ }
+ // JS:FIXME: This won't work with traps that do blocking operations
+ return box.getAndTriggerTraps(key);