Browser version of node.js events.