문제

I see my method for error handling invoked but since there's no arguments in, I don't know how to check what kind of error it is.

var xdr = new XDomainRequest();
xdr.onerror = function(e){
  alert(e);
}

In the above example e is undefined.

도움이 되었습니까?

해결책

When executing CORS, the error message is not available. And XDomainRequest is by the very definition of it cross-origin.

See this discussion as well as this definition.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top