Whenever a vacancy shall occur in an elective or appointive village or city office, it shall be filled in the manner provided by the law or charter governing the filling of vacancies in the village or city in which the vacancy occurs.