MCPcopy Create free account
hub / github.com/breck7/scroll / callback

Function callback

external/.datatables.js:3773–3800  ·  view source on GitHub ↗
(json)

Source from the content-addressed store, hash-verified

3771 var ajax = oSettings.ajax
3772 var instance = oSettings.oInstance
3773 var callback = function (json) {
3774 var status = oSettings.jqXHR ? oSettings.jqXHR.status : null
3775
3776 if (json === null || (typeof status === "number" && status == 204)) {
3777 json = {}
3778 _fnAjaxDataSrc(oSettings, json, [])
3779 }
3780
3781 var error = json.error || json.sError
3782 if (error) {
3783 _fnLog(oSettings, 0, error)
3784 }
3785
3786 // Microsoft often wrap JSON as a string in another JSON object
3787 // Let's handle that automatically
3788 if (json.d && typeof json.d === "string") {
3789 try {
3790 json = JSON.parse(json.d)
3791 } catch (e) {
3792 // noop
3793 }
3794 }
3795
3796 oSettings.json = json
3797
3798 _fnCallbackFire(oSettings, null, "xhr", [oSettings, json, oSettings.jqXHR], true)
3799 fn(json)
3800 }
3801
3802 if ($.isPlainObject(ajax) && ajax.data) {
3803 ajaxData = ajax.data

Callers 14

fetchHintsFunction · 0.85
runFunction · 0.85
growBranchMethod · 0.85
dropHandlerMethod · 0.85
_fnBuildAjaxFunction · 0.85
_fnSortAttachListenerFunction · 0.85
_fnLoadStateFunction · 0.85
_fnImplementStateFunction · 0.85
__reloadFunction · 0.85
timeoutFunction · 0.85
intervalFunction · 0.85
stitchFunction · 0.85

Calls 4

_fnAjaxDataSrcFunction · 0.85
_fnLogFunction · 0.85
_fnCallbackFireFunction · 0.85
fnFunction · 0.85

Tested by

no test coverage detected