3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
12 <title>Selection
</title>
13 <script src=
"../webcomponentsjs/webcomponents.js"></script>
14 <link rel=
"import" href=
"core-selection.html">
18 <polymer-element name=
"selection-example">
21 polyfill-next-selector { content: 'ul
> *'; }
26 polyfill-next-selector { content: 'ul
> .selected'; }
27 ::content
> .selected {
33 <ul on-tap=
"{{itemTapAction}}">
37 <core-selection id=
"selection" multi
on-core-select=
"{{selectAction}}"></core-selection>
41 Polymer('selection-example', {
42 itemTapAction: function(e
, detail
, sender
) {
43 this.$.selection
.select(e
.target
);
45 selectAction: function(e
, detail
, sender
) {
46 detail
.item
.classList
.toggle('selected', detail
.isSelected
);