MCPcopy Create free account
hub / github.com/d3/d3-request / readSync

Function readSync

test/XMLHttpRequest.js:48–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 function readSync() {
49 that.readyState = 2;
50 try {
51 var d = fs.readFileSync(info.url, "binary");
52 that.status = 200;
53 that.responseText = d;
54 that.responseXML = {_xml: d};
55 headers["Content-Length"] = d.length;
56 } catch (e) {
57 that.status = 404; // assumed
58 }
59 that.readyState = 4;
60 XMLHttpRequest._last = that;
61 if (that.onreadystatechange) that.onreadystatechange(new XMLHttpRequestProgressEvent(that));
62 }
63
64 that.getResponseHeader = function(n) {
65 return headers[n];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…