Event management for browser applications