Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js
index 93800bd7ddd6ef8f60ad1f134b1a75547544420e..5458b812550d0017c8e536ca48bc798d0cdebb6d 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-ajax/iron-request-extracted.js
@@ -26,7 +26,7 @@
* resolved.
*
* @attribute response
- * @type Object
+ * @type {*}
* @default null
*/
response: {
@@ -96,7 +96,7 @@
* the status code 0 is accepted as a success even though the outcome may
* be ambiguous.
*
- * @return boolean
+ * @return {boolean}
*/
get succeeded() {
var status = this.xhr.status || 0;
@@ -110,7 +110,6 @@
/**
* Sends an HTTP request to the server and returns the XHR object.
*
- * @method request
* @param {{
* url: string,
* method: (string|undefined),
@@ -127,13 +126,13 @@
* headers HTTP request headers.
* handleAs The response type. Default is 'text'.
* withCredentials Whether or not to send credentials on the request. Default is false.
- * @return Promise
+ * @return {Promise}
*/
send: function (options) {
var xhr = this.xhr;
if (xhr.readyState > 0) {
- return;
+ return null;
}
xhr.addEventListener('readystatechange', function () {
@@ -190,6 +189,14 @@
return this.completes;
},
+ /**
+ * Attempts to parse the response body of the XHR. If parsing succeeds,
+ * the value returned will be deserialized based on the `responseType`
+ * set on the XHR.
+ *
+ * @return {*} The parsed response,
+ * or undefined if there was an empty response or parsing failed.
+ */
parseResponse: function () {
var xhr = this.xhr;
var responseType = this.xhr.responseType ||
@@ -234,6 +241,9 @@
}
},
+ /**
+ * Aborts the request.
+ */
abort: function () {
this._setAborted(true);
this.xhr.abort();

Powered by Google App Engine
This is Rietveld 408576698