Skip to content

Commit be6de73

Browse files
vkrolmgol
authored andcommitted
jQuery.ajax: Clarify errorThrown and statusText may be empty in HTTP/2
Fixes jquery#1063 Closes jquery#1146
1 parent 9580ed5 commit be6de73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entries/jQuery.ajax.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ $.ajax({
109109
<argument name="jqXHR" type="jqXHR"/>
110110
<argument name="textStatus" type="String"/>
111111
<argument name="errorThrown" type="String"/>
112-
<desc>A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides <code>null</code>) are <code>"timeout"</code>, <code>"error"</code>, <code>"abort"</code>, and <code>"parsererror"</code>. When an HTTP error occurs, <code>errorThrown</code> receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." <strong>As of jQuery 1.5</strong>, the <code>error</code> setting can accept an array of functions. Each function will be called in turn. <strong>Note:</strong> <em>This handler is not called for cross-domain script and cross-domain JSONP requests.</em> This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
112+
<desc>A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides <code>null</code>) are <code>"timeout"</code>, <code>"error"</code>, <code>"abort"</code>, and <code>"parsererror"</code>. When an HTTP error occurs, <code>errorThrown</code> receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." (in HTTP/2 it may instead be an empty string) <strong>As of jQuery 1.5</strong>, the <code>error</code> setting can accept an array of functions. Each function will be called in turn. <strong>Note:</strong> <em>This handler is not called for cross-domain script and cross-domain JSONP requests.</em> This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
113113
</property>
114114
<property default="true" name="global" type="Boolean">
115115
<desc>Whether to trigger global Ajax event handlers for this request. The default is <code>true</code>. Set to <code>false</code> to prevent the global handlers like <code>ajaxStart</code> or <code>ajaxStop</code> from being triggered. This can be used to control various <a href="/Ajax_Events/">Ajax Events</a>.</desc>
@@ -290,7 +290,7 @@ jqxhr.always(function() {
290290
<code>status</code>
291291
</li>
292292
<li>
293-
<code>statusText</code>
293+
<code>statusText</code> (may be an empty string in HTTP/2)
294294
</li>
295295
<li>
296296
<code>abort( [ statusText ] )</code>

0 commit comments

Comments
 (0)