Cross-browser event handling system