6dZ6seCUQSphLsb9PL6udP changeset

Changeset653363656339 (b)
ParentNone (a)
ab
0+  var httpData = $.httpData || function( xhr, type, s ) { // lifted from jq1.4.4
0+    var ct = xhr.getResponseHeader("content-type") || "",
0+      xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
0+      data = xml ? xhr.responseXML : xhr.responseText;
0+
0+    if ( xml && data.documentElement.nodeName === "parsererror" ) {
0+      $.error( "parsererror" );
0+    }
0+    if ( s && s.dataFilter ) {
0+      data = s.dataFilter( data, type );
0+    }
0+    if ( typeof data === "string" ) {
0+      if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
0+        data = $.parseJSON( data );
0+      } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
0+        $.globalEval( data );
0+      }
0+    }
0+    return data;
0+  };
0+
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- Revision None
+++ Revision 653363656339
@@ -0,0 +1,21 @@
+ var httpData = $.httpData || function( xhr, type, s ) { // lifted from jq1.4.4
+ var ct = xhr.getResponseHeader("content-type") || "",
+ xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
+ data = xml ? xhr.responseXML : xhr.responseText;
+
+ if ( xml && data.documentElement.nodeName === "parsererror" ) {
+ $.error( "parsererror" );
+ }
+ if ( s && s.dataFilter ) {
+ data = s.dataFilter( data, type );
+ }
+ if ( typeof data === "string" ) {
+ if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
+ data = $.parseJSON( data );
+ } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
+ $.globalEval( data );
+ }
+ }
+ return data;
+ };
+