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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/paper-input/paper-input-char-counter-extracted.js

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove polymer/explainer Created 5 years, 7 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
(Empty)
1
2
3 (function() {
4
5 Polymer({
6
7 is: 'paper-input-char-counter',
8
9 enableCustomStyleProperties: true,
10
11 hostAttributes: {
12 'add-on': ''
13 },
14
15 properties: {
16
17 /**
18 * The associated input element.
19 */
20 inputElement: {
21 type: Object
22 },
23
24 /**
25 * The current value of the input element.
26 */
27 value: {
28 type: String
29 },
30
31 /**
32 * The character counter string.
33 */
34 charCounter: {
35 computed: '_computeCharCounter(inputElement,value)',
36 type: String
37 }
38
39 },
40
41 attached: function() {
42 this.fire('addon-attached');
43 },
44
45 _computeCharCounter: function(inputElement,value) {
46 var str = value.length;
47 if (inputElement.hasAttribute('maxlength')) {
48 str += '/' + inputElement.maxLength;
49 }
50 return str;
51 }
52
53 });
54
55 })();
56
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698