2002/10/16 06:22:38
[org.ibex.core.git] / src / org / xwt / Trap.java
index 94624ae..23a3455 100644 (file)
@@ -148,6 +148,13 @@ public class Trap {
         else return current.trapee;
     }
 
+    /** called by Rhino's arguments.trapname hack */
+    public static String currentTrapname() {
+        Trap current = TrapContext.get().currentTrap;
+        if (current == null) return null;
+        else return current.name;
+    }
+
     /** removes all traps whose function's ultimate parent scope is <tt>b</tt>. Used for retheming */
     public static void removeAllTrapsByBox(Box b) {
         Enumeration e = allTraps.keys();