javascript catch if firefox