MCPcopy
hub / github.com/CodeboxIDE/codebox / handleResponse

Function handleResponse

core/cb.addons/require-tools/less/lessc.js:6666–6673  ·  view source on GitHub ↗
(xhr, callback, errback)

Source from the content-addressed store, hash-verified

6664 xhr.send(null);
6665
6666 function handleResponse(xhr, callback, errback) {
6667 if (xhr.status >= 200 && xhr.status < 300) {
6668 callback(xhr.responseText,
6669 xhr.getResponseHeader("Last-Modified"));
6670 } else if (typeof(errback) === 'function') {
6671 errback(xhr.status, url);
6672 }
6673 }
6674
6675 if (isFileProtocol && !less.fileAsync) {
6676 if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {

Callers 1

doXHRFunction · 0.85

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected