evanw / evanw/node-source-map-support
source-map-support uses deprecated XMLHttpRequest on main thread
- Lingua principale
- JavaScript
- Stelle
- 2.2k
- Fork
- 223
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
FYI lately, Chrome warns me about something source-map-support does:
"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/."
It points to this bit of code:
```
function retrieveSourceMapURL(source) {
var fileData;
if (isInBrowser()) {
var xhr = new XMLHttpRequest();
xhr.open('GET', source, false);
xhr.send(null);
fileData = xhr.readyState === 4 ? xhr.responseText : null;
// Support providing a sourceMappingURL via the SourceMap header
var sourceMapHeader = xhr.getResponseHeader("SourceMap") ||
xhr.getResponseHeader("X-SourceMap");
if (sourceMapHeader) {
return sourceMapHeader;
}
}
```
Maybe this needs to be done differently in the future.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.