Exceptions thrown by XHR.setRequestHeader() have been clarified

Published: | Categories: DOM | Creative Commons BY-SA 3.0


An exception code thrown by the XMLHttpRequest.setRequestHeader function was previously NS_ERROR_FAILURE regardless of the error. Two exception codes defined in the spec, NS_ERROR_DOM_INVALID_STATE_ERR and NS_ERROR_DOM_SYNTAX_ERR, are now used to make sure those errors can be clearly distinguished.