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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-form-element-behavior/iron-form-element-behavior-extracted.js

Issue 1287713002: [MD settings] merge polymer 1.0.11; hack for settings checkbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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-form-element-behavior/iron-form-element-behavior-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-form-element-behavior/iron-form-element-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-form-element-behavior/iron-form-element-behavior-extracted.js
index d5bec7c74e934acf21579954d79a4f244e776121..051050ba3dbd6d993e3295e756bb990d2e91c29f 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-form-element-behavior/iron-form-element-behavior-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-form-element-behavior/iron-form-element-behavior-extracted.js
@@ -1,10 +1,9 @@
-
-
- /**
+/**
+ Polymer.IronFormElementBehavior enables a custom element to be included
+ in an `iron-form`.
@demo demo/index.html
@polymerBehavior
-
*/
Polymer.IronFormElementBehavior = {
@@ -37,6 +36,19 @@
},
/**
+ * Set to true to mark the input as required. If used in a form, a
+ * custom element that uses this behavior should also use
+ * Polymer.IronValidatableBehavior and define a custom validation method.
+ * Otherwise, a `required` element will always be considered valid.
+ * It's also strongly recomended to provide a visual style for the element
+ * when it's value is invalid.
+ */
+ required: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
* The form that the element is registered to.
*/
_parentForm: {
@@ -56,5 +68,4 @@
}
}
- };
-
+ };

Powered by Google App Engine
This is Rietveld 408576698