| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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: 'side-bar', |
| 7 |
| 8 properties: { |
| 9 selectedDisplay: { |
| 10 type: String, |
| 11 value: 'history-button' |
| 12 } |
| 13 }, |
| 14 |
| 15 changeDisplay: function(e) { |
| 16 this.selectedPage = e.currentTarget.id; |
| 17 |
| 18 var currentButton = |
| 19 Polymer.dom(this.root).querySelector('.selected'); |
| 20 currentButton.classList.remove('selected'); |
| 21 |
| 22 var buttonPressed = |
| 23 Polymer.dom(this.root).querySelector('#' + e.currentTarget.id); |
| 24 buttonPressed.classList.add('selected'); |
| 25 |
| 26 this.fire('switch-display', { display: this.selectedPage }); |
| 27 } |
| 28 }); |
| OLD | NEW |