MCPcopy
hub / github.com/Tampermonkey/tampermonkey / onload

Function onload

src/xmlhttprequest.js:62–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 return o;
61 };
62 var onload = function() {
63 var responseState = createState();
64 if (responseState.readyState == 4 &&
65 responseState.status != 200 &&
66 responseState.status != 0 &&
67 details.retries > 0) {
68 details.retries--;
69 // console.log("bg: error at onload, should not happen! -> retry :)")
70 xmlhttpRequest(details, callback, onreadychange, onerr, done, internal);
71 return;
72 }
73 if (callback) callback(responseState);
74 if (done) done();
75 };
76 var onerror = function() {
77 var responseState = createState();
78 if (responseState.readyState == 4 &&

Callers

nothing calls this directly

Calls 4

createStateFunction · 0.85
xmlhttpRequestFunction · 0.85
callbackFunction · 0.85
doneFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…