MCPcopy
hub / github.com/apache/echarts / loadText

Function loadText

test/lib/simpleRequire.js:73–90  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

71 }
72
73 function loadText(url) {
74 return new Promise(function (resolve, reject) {
75 var xhr = new XMLHttpRequest();
76 xhr.onload = function (e) {
77 if (xhr.status === 200) {
78 resolve(xhr.responseText);
79 }
80 else {
81 handleLoadError(url, resolve, reject);
82 }
83 }
84 xhr.onerror = function (e) {
85 handleLoadError(url, resolve, reject);
86 }
87 xhr.open('GET', url);
88 xhr.send();
89 });
90 }
91
92 function loadJSON(url) {
93 return loadText(url).then(function (text) {

Callers 2

loadJSONFunction · 0.85
loadModFunction · 0.85

Calls 1

handleLoadErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…