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

Side by Side Diff: third_party/polymer/v1_0/components/iron-autogrow-textarea/iron-autogrow-textarea.html

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 @license 2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also 7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 10
11 <link rel="import" href="../polymer/polymer.html"> 11 <link rel="import" href="../polymer/polymer.html">
12 <link rel="import" href="../iron-behaviors/iron-control-state.html">
12 <link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html"> 13 <link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
13 <link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior. html"> 14 <link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior. html">
14 15
15 <!-- 16 <!--
16 `iron-autogrow-textarea` is an element containing a textarea that grows in heigh t as more 17 `iron-autogrow-textarea` is an element containing a textarea that grows in heigh t as more
17 lines of input are entered. Unless an explicit height or the `maxRows` property is set, it will 18 lines of input are entered. Unless an explicit height or the `maxRows` property is set, it will
18 never scroll. 19 never scroll.
19 20
20 Example: 21 Example:
21 22
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 autofocus$="[[autofocus]]" 79 autofocus$="[[autofocus]]"
79 inputmode$="[[inputmode]]" 80 inputmode$="[[inputmode]]"
80 name$="[[name]]" 81 name$="[[name]]"
81 placeholder$="[[placeholder]]" 82 placeholder$="[[placeholder]]"
82 readonly$="[[readonly]]" 83 readonly$="[[readonly]]"
83 required$="[[required]]" 84 required$="[[required]]"
84 rows$="[[rows]]" 85 rows$="[[rows]]"
85 maxlength$="[[maxlength]]"></textarea> 86 maxlength$="[[maxlength]]"></textarea>
86 </div> 87 </div>
87 </template> 88 </template>
89 </dom-module>
88 90
89 <script> 91 <script>
90 92
91 Polymer({ 93 Polymer({
92 94
93 is: 'iron-autogrow-textarea', 95 is: 'iron-autogrow-textarea',
94 96
95 behaviors: [ 97 behaviors: [
96 Polymer.IronValidatableBehavior 98 Polymer.IronValidatableBehavior,
99 Polymer.IronControlState
97 ], 100 ],
98 101
99 properties: { 102 properties: {
100 103
101 /** 104 /**
102 * Use this property instead of `value` for two-way data binding. 105 * Use this property instead of `value` for two-way data binding.
103 */ 106 */
104 bindValue: { 107 bindValue: {
105 observer: '_bindValueChanged', 108 observer: '_bindValueChanged',
106 type: String 109 type: String
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 257 }
255 this.tokens = (input && input.value) ? input.value.replace(/&/gm, '&amp;') .replace(/"/gm, '&quot;').replace(/'/gm, '&#39;').replace(/</gm, '&lt;').replace (/>/gm, '&gt;').split('\n') : ['']; 258 this.tokens = (input && input.value) ? input.value.replace(/&/gm, '&amp;') .replace(/"/gm, '&quot;').replace(/'/gm, '&#39;').replace(/</gm, '&lt;').replace (/>/gm, '&gt;').split('\n') : [''];
256 return this._constrain(this.tokens); 259 return this._constrain(this.tokens);
257 }, 260 },
258 261
259 _updateCached: function() { 262 _updateCached: function() {
260 this.$.mirror.innerHTML = this._constrain(this.tokens); 263 this.$.mirror.innerHTML = this._constrain(this.tokens);
261 } 264 }
262 }) 265 })
263 </script> 266 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698