Added cross-browser support.