Extract method JavaScript#render_event