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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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
1 1
2 Polymer({ 2 Polymer({
3 is: 'paper-icon-button', 3 is: 'paper-icon-button',
4 4
5 hostAttributes: {
6 role: 'button',
7 tabindex: '0'
8 },
9
5 behaviors: [ 10 behaviors: [
6 Polymer.PaperButtonBehavior, 11 Polymer.PaperInkyFocusBehavior
7 Polymer.PaperRadioButtonBehavior
8 ], 12 ],
9 13
10 properties: { 14 properties: {
11 /** 15 /**
12 * The URL of an image for the icon. If the src property is specified, 16 * The URL of an image for the icon. If the src property is specified,
13 * the icon property should not be. 17 * the icon property should not be.
14 */ 18 */
15 src: { 19 src: {
16 type: String 20 type: String
17 }, 21 },
18 22
19 /** 23 /**
20 * Specifies the icon name or index in the set of icons available in 24 * Specifies the icon name or index in the set of icons available in
21 * the icon's icon set. If the icon property is specified, 25 * the icon's icon set. If the icon property is specified,
22 * the src property should not be. 26 * the src property should not be.
23 */ 27 */
24 icon: { 28 icon: {
25 type: String 29 type: String
30 },
31
32 /**
33 * Specifies the alternate text for the button, for accessibility.
34 */
35 alt: {
36 type: String,
37 observer: "_altChanged"
38 }
39 },
40
41 _altChanged: function(newValue, oldValue) {
42 var label = this.getAttribute('aria-label');
43
44 // Don't stomp over a user-set aria-label.
45 if (!label || oldValue == label) {
46 this.setAttribute('aria-label', newValue);
26 } 47 }
27 } 48 }
28 }); 49 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698