OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Polymer({ |
| 6 is: 'files-icon-button', |
| 7 |
| 8 hostAttributes: { |
| 9 role: 'button', |
| 10 tabindex: 0 |
| 11 }, |
| 12 |
| 13 behaviors: [ |
| 14 Polymer.IronButtonState, |
| 15 Polymer.IronControlState |
| 16 ], |
| 17 |
| 18 observers: [ |
| 19 '_focusedChanged(receivedFocusFromKeyboard)' |
| 20 ], |
| 21 |
| 22 _focusedChanged: function(receivedFocusFromKeyboard) { |
| 23 if (receivedFocusFromKeyboard) { |
| 24 this.classList.add('keyboard-focus'); |
| 25 } else { |
| 26 this.classList.remove('keyboard-focus'); |
| 27 } |
| 28 } |
| 29 }); |
OLD | NEW |