Separated event-listeners in browser part of the library.
Restricted invalid event type by exception.