Use .overrideMimeType() for Firefox XHR
By overriding the mime type of the default XML to 'text/css' we get rid of the automatic XML parsing and DOM building that XMLHttpRequest tries to do whenever it gets a response.
This commit is contained in:
parent
65de5f2d89
commit
7a5e10e996
@ -167,6 +167,9 @@ function xhr(url, callback, errback) {
|
||||
var xhr = getXMLHttpRequest();
|
||||
var async = isFileProtocol ? false : less.async;
|
||||
|
||||
if (typeof xhr.overrideMimeType === 'function') {
|
||||
xhr.overrideMimeType('text/css');
|
||||
}
|
||||
xhr.open('GET', url, async);
|
||||
xhr.send(null);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user