MCPcopy
hub / github.com/MithrilJS/mithril.js / testonreadystatechange

Function testonreadystatechange

request/tests/test-request.js:401–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

399 function handleAbort(xhr) {
400 var onreadystatechange = xhr.onreadystatechange // probably not set yet
401 var testonreadystatechange = function() {
402 onreadystatechange.call(xhr)
403 setTimeout(function() { // allow promises to (not) resolve first
404 o(failed).equals(false)
405 o(resolved).equals(false)
406 done()
407 }, 0)
408 }
409 Object.defineProperty(xhr, "onreadystatechange", {
410 set: function(val) { onreadystatechange = val },
411 get: function() { return testonreadystatechange }

Callers

nothing calls this directly

Calls 2

oFunction · 0.85
doneFunction · 0.85

Tested by

no test coverage detected