Using removeEventListener function to remove a event listener. First, we add an event listener for DrawComplete event and it shows an alert. In this event listener we remove the listener. Use the button to set a chart attribute and raise the DrawComplete event again. Now, notice that the event listener (showing alert) will not be called.