Skip to content

Commit 9fb6262

Browse files
committed
Merge pull request #351 from tommycli/master
Fix closure compiler error (using Chromium settings).
2 parents 96efaa0 + b5ec339 commit 9fb6262

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

paper-input-addon-behavior.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
/**
3232
* The function called by `<paper-input-container>` when the input value or validity changes.
3333
* @param {{
34-
* inputElement: (Node|undefined),
34+
* inputElement: (Element|undefined),
3535
* value: (string|undefined),
36-
* invalid: (boolean|undefined)
37-
* }} state All properties are optional -
36+
* invalid: boolean
37+
* }} state -
3838
* inputElement: The input element.
3939
* value: The input value.
4040
* invalid: True if the input value is invalid.

paper-input-char-counter.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,25 @@
6565
}
6666
},
6767

68+
/**
69+
* This overrides the update function in PaperInputAddonBehavior.
70+
* @param {{
71+
* inputElement: (Element|undefined),
72+
* value: (string|undefined),
73+
* invalid: boolean
74+
* }} state -
75+
* inputElement: The input element.
76+
* value: The input value.
77+
* invalid: True if the input value is invalid.
78+
*/
6879
update: function(state) {
6980
if (!state.inputElement) {
7081
return;
7182
}
7283

7384
state.value = state.value || '';
7485

75-
var counter = state.value.length;
86+
var counter = state.value.length.toString();
7687

7788
if (state.inputElement.hasAttribute('maxlength')) {
7889
counter += '/' + state.inputElement.getAttribute('maxlength');

paper-input-error.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@
7676
}
7777
},
7878

79+
/**
80+
* This overrides the update function in PaperInputAddonBehavior.
81+
* @param {{
82+
* inputElement: (Element|undefined),
83+
* value: (string|undefined),
84+
* invalid: boolean
85+
* }} state -
86+
* inputElement: The input element.
87+
* value: The input value.
88+
* invalid: True if the input value is invalid.
89+
*/
7990
update: function(state) {
8091
this._setInvalid(state.invalid);
8192
}

0 commit comments

Comments
 (0)