cross-browser eol in javascript