added cross-browser event util