lib: Use component/emitter for EventEmitter in browser