Add support for addEvent