MCPcopy Index your code
hub / github.com/TruthHun/BookStack / httpData

Function httpData

static/js/jquery.form.js:802–824  ·  view source on GitHub ↗
( xhr, type, s )

Source from the content-addressed store, hash-verified

800 };
801
802 var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
803
804 var ct = xhr.getResponseHeader('content-type') || '',
805 xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
806 data = xml ? xhr.responseXML : xhr.responseText;
807
808 if (xml && data.documentElement.nodeName === 'parsererror') {
809 if ($.error) {
810 $.error('parsererror');
811 }
812 }
813 if (s && s.dataFilter) {
814 data = s.dataFilter(data, type);
815 }
816 if (typeof data === 'string') {
817 if (type === 'json' || !type && ct.indexOf('json') >= 0) {
818 data = parseJSON(data);
819 } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
820 $.globalEval(data);
821 }
822 }
823 return data;
824 };
825
826 return deferred;
827 }

Callers 1

cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected