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 /** | 5 /** |
6 * @fileoverview An item in a drop-down menu in the ChromeVox panel. | 6 * @fileoverview An item in a drop-down menu in the ChromeVox panel. |
7 */ | 7 */ |
8 | 8 |
9 goog.provide('PanelMenuItem'); | 9 goog.provide('PanelMenuItem'); |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 var title = document.createElement('td'); | 29 var title = document.createElement('td'); |
30 title.className = 'menu-item-title'; | 30 title.className = 'menu-item-title'; |
31 title.textContent = menuItemTitle; | 31 title.textContent = menuItemTitle; |
32 this.element.appendChild(title); | 32 this.element.appendChild(title); |
33 | 33 |
34 var shortcut = document.createElement('td'); | 34 var shortcut = document.createElement('td'); |
35 shortcut.className = 'menu-item-shortcut'; | 35 shortcut.className = 'menu-item-shortcut'; |
36 shortcut.textContent = menuItemShortcut; | 36 shortcut.textContent = menuItemShortcut; |
37 this.element.appendChild(shortcut); | 37 this.element.appendChild(shortcut); |
38 }; | 38 }; |
| 39 |
| 40 PanelMenuItem.prototype = { |
| 41 get text() { |
| 42 return this.element.textContent; |
| 43 } |
| 44 }; |
OLD | NEW |