How to detect XMLHttpRequest errors in a Chrome application

How to detect errors XMLHttpRequestin a Chrome application.

For example, I want to know when it is generated net::ERR_NAME_NOT_RESOLVED, so I can display an error message to the user.

XMLHttpRequest.onerror starts up however I cannot distinguish this error or net::ERR_INSECURE_RESPONSE

+4
source share
1 answer

If you want more control, you can use the chrome.sockets permission and determine the connection problem "manually." I am doing something similar in chromesocketxhr.js

0
source

All Articles