| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 DotList implementation | 6 * @fileoverview DotList implementation |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('ntp', function() { | 9 cr.define('ntp', function() { |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Live list of the navigation dots. | 13 * Live list of the navigation dots. |
| 14 * @type {!NodeList|undefined} | 14 * @type {!NodeList|undefined} |
| 15 */ | 15 */ |
| 16 var navDots; | 16 var navDots; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Creates a new DotList object. | 19 * Creates a new DotList object. |
| 20 * @constructor | 20 * @constructor |
| 21 * @extends {HTMLUListElement} | 21 * @extends {HTMLUListElement} |
| 22 */ | 22 */ |
| 23 var DotList = cr.ui.define('ul'); | 23 var DotList = cr.ui.define('ul'); |
| 24 | 24 |
| 25 DotList.prototype = { | 25 DotList.prototype = { |
| 26 __proto__: HTMLUListElement.prototype, | 26 __proto__: HTMLUListElement.prototype, |
| 27 | 27 |
| 28 /** @override */ | |
| 29 decorate: function() { | 28 decorate: function() { |
| 30 this.addEventListener('keydown', this.onKeyDown_.bind(this)); | 29 this.addEventListener('keydown', this.onKeyDown_.bind(this)); |
| 31 navDots = this.getElementsByClassName('dot'); | 30 navDots = this.getElementsByClassName('dot'); |
| 32 }, | 31 }, |
| 33 | 32 |
| 34 /** | 33 /** |
| 35 * Live list of the navigation dots. | 34 * Live list of the navigation dots. |
| 36 * @type {!NodeList|undefined} | 35 * @type {!NodeList|undefined} |
| 37 */ | 36 */ |
| 38 get dots() { | 37 get dots() { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 70 |
| 72 e.stopPropagation(); | 71 e.stopPropagation(); |
| 73 e.preventDefault(); | 72 e.preventDefault(); |
| 74 } | 73 } |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 return { | 76 return { |
| 78 DotList: DotList | 77 DotList: DotList |
| 79 }; | 78 }; |
| 80 }); | 79 }); |
| OLD | NEW |