(dataType)
| 106 | seekingTransport = (structure === transports); |
| 107 | |
| 108 | function inspect(dataType) { |
| 109 | var selected; |
| 110 | inspected[dataType] = true; |
| 111 | jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) { |
| 112 | var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); |
| 113 | /** |
| 114 | * 针对jonsp处理 |
| 115 | */ |
| 116 | if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { |
| 117 | //增加cache设置标记 |
| 118 | //不需要缓存 |
| 119 | //dataTypes: Array[2] |
| 120 | // 0: "script" |
| 121 | // 1: "json" |
| 122 | options.dataTypes.unshift(dataTypeOrTransport); |
| 123 | inspect(dataTypeOrTransport); |
| 124 | return false; |
| 125 | } else if (seekingTransport) { |
| 126 | return !(selected = dataTypeOrTransport); |
| 127 | } |
| 128 | }); |
| 129 | return selected; |
| 130 | } |
| 131 | |
| 132 | return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); |
| 133 | } |
no outgoing calls
no test coverage detected