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

Unified Diff: third_party/polymer/polymer-selector/polymer-selector.html

Issue 218583004: Uprev to Polymer 0.2.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-shadow
Patch Set: Remove keyboard code from patch. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/polymer/polymer-selector/bower.json ('k') | third_party/polymer/polymer-selector/smoke.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/polymer/polymer-selector/polymer-selector.html
diff --git a/third_party/polymer/polymer-selector/polymer-selector.html b/third_party/polymer/polymer-selector/polymer-selector.html
index 63807f434972945dec25efd0625b9117b445f784..a1dcac2e0a997d9848debc8173a230681efc330f 100644
--- a/third_party/polymer/polymer-selector/polymer-selector.html
+++ b/third_party/polymer/polymer-selector/polymer-selector.html
@@ -38,6 +38,7 @@ license that can be found in the LICENSE file.
* </polymer-selector>
*
* @class polymer-selector
+ * @status stable
*/
/**
* Fired when an item's selection state is changed. This event is fired both
@@ -61,7 +62,7 @@ license that can be found in the LICENSE file.
<link rel="import" href="../polymer-selection/polymer-selection.html">
<polymer-element name="polymer-selector"
- attributes="selected multi valueattr selectedClass selectedProperty selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent">
+ attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent">
<template>
<polymer-selection id="selection" multi="{{multi}}" on-polymer-select="{{selectionSelect}}"></polymer-selection>
<content id="items" select="*"></content>
@@ -130,9 +131,18 @@ license that can be found in the LICENSE file.
*
* @attribute selectedProperty
* @type string
+ * @default ''
+ */
+ selectedProperty: '',
+ /**
+ * Specifies the property to be used to set on the selected element
+ * to indicate its active state.
+ *
+ * @attribute selectedProperty
+ * @type string
* @default 'active'
*/
- selectedProperty: 'active',
+ selectedAttribute: 'active',
/**
* Returns the currently selected element. In multi-selection this returns
* an array of selected elements.
@@ -308,6 +318,13 @@ license that can be found in the LICENSE file.
if (this.selectedProperty) {
item[this.selectedProperty] = isSelected;
}
+ if (this.selectedAttribute && item.setAttribute) {
+ if (isSelected) {
+ item.setAttribute(this.selectedAttribute, '');
+ } else {
+ item.removeAttribute(this.selectedAttribute);
+ }
+ }
},
// event fired from host
activateHandler: function(e) {
« no previous file with comments | « third_party/polymer/polymer-selector/bower.json ('k') | third_party/polymer/polymer-selector/smoke.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698