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

Unified Diff: lib/src/iron-form/iron-form.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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: lib/src/iron-form/iron-form.html
diff --git a/lib/src/iron-form/iron-form.html b/lib/src/iron-form/iron-form.html
index 7f6f41fae01ff128d5bc8c559757d10db1d49e7b..f7e08c164610e499018be99d0fb6cad62a9601f8 100644
--- a/lib/src/iron-form/iron-form.html
+++ b/lib/src/iron-form/iron-form.html
@@ -76,6 +76,19 @@ call the form's `submit` method.
withCredentials: {
type: Boolean,
value: false
+ },
+
+ /**
+ * HTTP request headers to send
+ *
+ * Note: setting a `Content-Type` header here will override the value
+ * specified by the `contentType` property of this element.
+ */
+ headers: {
+ type: Object,
+ value: function() {
+ return {};
+ }
}
},
/**
@@ -137,6 +150,7 @@ call the form's `submit` method.
this._requestBot.method = this.method;
this._requestBot.contentType = this.contentType;
this._requestBot.withCredentials = this.withCredentials;
+ this._requestBot.headers = this.headers;
if (this.method.toUpperCase() == 'POST') {
this._requestBot.body = json;
@@ -208,7 +222,7 @@ call the form's `submit` method.
},
_handleFormResponse: function (event) {
- this.fire('iron-form-response', event.detail.response);
+ this.fire('iron-form-response', event.detail);
},
_handleFormError: function (event) {
« no previous file with comments | « lib/src/iron-form-element-behavior/iron-form-element-behavior.html ('k') | lib/src/iron-form/test/basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698