OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 Polymer({ | 5 Polymer({ |
6 is: 'welcome-win10-inline', | 6 is: 'welcome-win10-inline', |
7 | 7 |
8 properties: { | 8 properties: { |
9 // Determines if the combined variant should be displayed. The combined | 9 // Determines if the combined variant should be displayed. The combined |
10 // variant includes instructions on how to pin Chrome to the taskbar. | 10 // variant includes instructions on how to pin Chrome to the taskbar. |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 onContinue: function() { | 41 onContinue: function() { |
42 chrome.send('handleContinue'); | 42 chrome.send('handleContinue'); |
43 }, | 43 }, |
44 | 44 |
45 onOpenSettings: function() { | 45 onOpenSettings: function() { |
46 chrome.send('handleSetDefaultBrowser'); | 46 chrome.send('handleSetDefaultBrowser'); |
47 }, | 47 }, |
48 | 48 |
49 onToggle: function() { | 49 onToggle: function() { |
50 if (this.isCombined) { | 50 if (!this.isCombined) |
51 var sections = this.shadowRoot.querySelectorAll('.section.expandable'); | 51 return; |
52 sections.forEach(function(section) { | 52 var sections = this.shadowRoot.querySelectorAll('.section.expandable'); |
53 section.classList.toggle('expanded'); | 53 sections.forEach(function(section) { |
54 }); | 54 var isExpanded = section.classList.toggle('expanded'); |
55 } | 55 section.querySelector('[role~="button"]').setAttribute( |
| 56 'aria-expanded', isExpanded); |
| 57 }); |
56 } | 58 } |
57 }); | 59 }); |
OLD | NEW |