Setting location.protocol to an invalid value throws SyntaxError