I think I would just call alert() directly here rather than defining a new function for it. That way it is obvious that it is a blocking call.