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

Unified Diff: lib/paper_input_behavior.dart

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
« no previous file with comments | « lib/paper_input.dart ('k') | lib/paper_input_container.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/paper_input_behavior.dart
diff --git a/lib/paper_input_behavior.dart b/lib/paper_input_behavior.dart
index 24fb2ac472172fe37c8bc45dd92fb8314fa75202..fcddf247eca7a6680376706e148a7141500a2ce2 100644
--- a/lib/paper_input_behavior.dart
+++ b/lib/paper_input_behavior.dart
@@ -20,6 +20,10 @@ import 'iron_control_state.dart';
@BehaviorProxy(const ['Polymer', 'PaperInputBehavior'])
abstract class PaperInputBehavior implements CustomElementProxyMixin, IronControlState {
+ /// Bind this to the `<input is="iron-input">`'s `accept` property, , used with type=file.
+ String get accept => jsElement[r'accept'];
+ set accept(String value) { jsElement[r'accept'] = value; }
+
/// Set this to specify the pattern allowed by `preventInvalidInput`. Bind this to the
/// `<input is="iron-input">`'s `allowedPattern` property.
String get allowedPattern => jsElement[r'allowedPattern'];
@@ -46,6 +50,10 @@ abstract class PaperInputBehavior implements CustomElementProxyMixin, IronContro
bool get autofocus => jsElement[r'autofocus'];
set autofocus(bool value) { jsElement[r'autofocus'] = value; }
+ /// Bind this to the `<input is="iron-input">`'s `autosave` property, used with type=search.
+ String get autosave => jsElement[r'autosave'];
+ set autosave(String value) { jsElement[r'autosave'] = value; }
+
/// Set to true to auto-validate the input value. Bind this to the `<paper-input-container>`'s
/// `autoValidate` property.
bool get autoValidate => jsElement[r'autoValidate'];
@@ -81,7 +89,7 @@ abstract class PaperInputBehavior implements CustomElementProxyMixin, IronContro
String get label => jsElement[r'label'];
set label(String value) { jsElement[r'label'] = value; }
- /// The datalist of the input (if any). This should match the id of an existing <datalist>. Bind this
+ /// The datalist of the input (if any). This should match the id of an existing `<datalist>`. Bind this
/// to the `<input is="iron-input">`'s `list` property.
String get list => jsElement[r'list'];
set list(String value) { jsElement[r'list'] = value; }
@@ -106,6 +114,10 @@ abstract class PaperInputBehavior implements CustomElementProxyMixin, IronContro
num get minlength => jsElement[r'minlength'];
set minlength(num value) { jsElement[r'minlength'] = value; }
+ /// Bind this to the `<input is="iron-input">`'s `multiple` property, , used with type=file.
+ bool get multiple => jsElement[r'multiple'];
+ set multiple(bool value) { jsElement[r'multiple'] = value; }
+
/// Bind this to the `<input is="iron-input">`'s `name` property.
String get name => jsElement[r'name'];
set name(String value) { jsElement[r'name'] = value; }
@@ -138,6 +150,10 @@ abstract class PaperInputBehavior implements CustomElementProxyMixin, IronContro
bool get required => jsElement[r'required'];
set required(bool value) { jsElement[r'required'] = value; }
+ /// Bind this to the `<input is="iron-input">`'s `results` property, , used with type=search.
+ num get results => jsElement[r'results'];
+ set results(num value) { jsElement[r'results'] = value; }
+
/// Bind this to the `<input is="iron-input">`'s `size` property.
num get size => jsElement[r'size'];
set size(num value) { jsElement[r'size'] = value; }
@@ -159,8 +175,8 @@ abstract class PaperInputBehavior implements CustomElementProxyMixin, IronContro
/// The value for this input. Bind this to the `<input is="iron-input">`'s `bindValue`
/// property, or the value property of your input that is `notify:true`.
- String get value => jsElement[r'value'];
- set value(String value) { jsElement[r'value'] = value; }
+ get value => jsElement[r'value'];
+ set value(value) { jsElement[r'value'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;}
/// Restores the cursor to its original position after updating the value.
/// [newValue]: The value that should be saved.
« no previous file with comments | « lib/paper_input.dart ('k') | lib/paper_input_container.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698