Skip to content

Commit 9dce32c

Browse files
committed
Introduce declarative event mapping
1 parent 8ba3ad8 commit 9dce32c

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

filter-by-text.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<div>{{ matchCount }} matches</div>
1010

11-
<basic-list-box id="options" class="options">
11+
<basic-list-box on-core-select="{{ onListBoxSelect }}" class="options">
1212
<content></content>
1313
</basic-list-box>
1414

filter-by-text.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ Polymer('filter-by-text', {
33
matchCount: 0,
44

55
attached: function() {
6-
this.cachedListener = this.onListBoxSelect.bind(this);
7-
this.$.options.addEventListener('core-select', this.cachedListener);
8-
96
this.filterText = this.getAttribute('filterText') || '';
107
},
118

12-
detached: function() {
13-
this.$.options.removeEventListener('core-select', this.cachedListener);
14-
},
15-
169
filter: function(filterText) {
1710
var matches = 0;
1811

0 commit comments

Comments
 (0)