implements cross browser message handler