| Index: polymer_0.5.4/bower_components/core-ajax/core-ajax.html
|
| diff --git a/polymer_0.5.0/bower_components/core-ajax/core-ajax.html b/polymer_0.5.4/bower_components/core-ajax/core-ajax.html
|
| similarity index 94%
|
| copy from polymer_0.5.0/bower_components/core-ajax/core-ajax.html
|
| copy to polymer_0.5.4/bower_components/core-ajax/core-ajax.html
|
| index c0ca0adbc25f5919da4c0f25131b4a5e5ed1f01f..7b36af2bb497e935a6f5e99d2eab82ef96d8e822 100644
|
| --- a/polymer_0.5.0/bower_components/core-ajax/core-ajax.html
|
| +++ b/polymer_0.5.4/bower_components/core-ajax/core-ajax.html
|
| @@ -100,7 +100,7 @@ element.
|
| * Parameters to send to the specified URL, as JSON.
|
| *
|
| * @attribute params
|
| - * @type string (JSON)
|
| + * @type string
|
| * @default ''
|
| */
|
| params: '',
|
| @@ -347,6 +347,14 @@ element.
|
| }
|
| },
|
|
|
| + getParams: function(params) {
|
| + params = this.params || params;
|
| + if (params && typeof(params) == 'string') {
|
| + params = JSON.parse(params);
|
| + }
|
| + return params;
|
| + },
|
| +
|
| /**
|
| * Performs an Ajax request to the specified URL.
|
| *
|
| @@ -356,10 +364,7 @@ element.
|
| var args = this.xhrArgs || {};
|
| // TODO(sjmiles): we may want XHR to default to POST if body is set
|
| args.body = this.body || args.body;
|
| - args.params = this.params || args.params;
|
| - if (args.params && typeof(args.params) == 'string') {
|
| - args.params = JSON.parse(args.params);
|
| - }
|
| + args.params = this.getParams(args.params);
|
| args.headers = this.headers || args.headers || {};
|
| if (args.headers && typeof(args.headers) == 'string') {
|
| args.headers = JSON.parse(args.headers);
|
| @@ -403,6 +408,20 @@ element.
|
| }
|
| }
|
| return this.activeRequest;
|
| + },
|
| +
|
| + /**
|
| + * Aborts the current active request if there is one and resets internal
|
| + * state appropriately.
|
| + *
|
| + * @method abort
|
| + */
|
| + abort: function() {
|
| + if (!this.activeRequest) return;
|
| + this.activeRequest.abort();
|
| + this.activeRequest = null;
|
| + this.progress = {};
|
| + this.loading = false;
|
| }
|
|
|
| });
|
|
|