public static object GetObjectIndex(Scriptable obj, int index, Context cx) { object result = ScriptableObject.GetProperty(obj, index); if (result == ScriptableConstants.NOT_FOUND) { result = Undefined.instance; } return result; }