313314315316317318319320321322323
while (!callbacks.isEmpty()) { XhrCallback callback = callbacks.remove(0); if (success) { callback.onSuccess(xhr); } else { callback.onFail(xhr); } } } } };