mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
use the right xml http request for local file access. from @Scorpin
This commit is contained in:
@@ -411,12 +411,12 @@ function pathDiff(url, baseUrl) {
|
||||
}
|
||||
|
||||
function getXMLHttpRequest() {
|
||||
if (window.XMLHttpRequest) {
|
||||
if (window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject)) {
|
||||
return new XMLHttpRequest();
|
||||
} else {
|
||||
try {
|
||||
/*global ActiveXObject */
|
||||
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (e) {
|
||||
log("browser doesn't support AJAX.", logLevel.errors);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user