Support attach and detach multiple events