| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 6 /** |
| 7 * @fileoverview A DOM traversal interface for moving a selection around a | 7 * @fileoverview A DOM traversal interface for moving a selection around a |
| 8 * webpage. Provides multiple granularities: | 8 * webpage. Provides multiple granularities: |
| 9 * 1. Move by paragraph. | 9 * 1. Move by paragraph. |
| 10 * 2. Move by sentence. | 10 * 2. Move by sentence. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * The string constant for paragraph granularity. | 110 * The string constant for paragraph granularity. |
| 111 * @type {string} | 111 * @type {string} |
| 112 * @const | 112 * @const |
| 113 */ | 113 */ |
| 114 cvox.TraverseContent.kParagraph = 'paragraph'; | 114 cvox.TraverseContent.kParagraph = 'paragraph'; |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * A constant array of all granularities. | 117 * A constant array of all granularities. |
| 118 * @type {Array.<string>} | 118 * @type {Array<string>} |
| 119 * @const | 119 * @const |
| 120 */ | 120 */ |
| 121 cvox.TraverseContent.kAllGrains = | 121 cvox.TraverseContent.kAllGrains = |
| 122 [cvox.TraverseContent.kParagraph, | 122 [cvox.TraverseContent.kParagraph, |
| 123 cvox.TraverseContent.kSentence, | 123 cvox.TraverseContent.kSentence, |
| 124 cvox.TraverseContent.kLine, | 124 cvox.TraverseContent.kLine, |
| 125 cvox.TraverseContent.kWord, | 125 cvox.TraverseContent.kWord, |
| 126 cvox.TraverseContent.kCharacter]; | 126 cvox.TraverseContent.kCharacter]; |
| 127 | 127 |
| 128 /** | 128 /** |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 /** | 474 /** |
| 475 * Resets the selection. | 475 * Resets the selection. |
| 476 * | 476 * |
| 477 * @param {Node=} domObj a DOM node. Optional. | 477 * @param {Node=} domObj a DOM node. Optional. |
| 478 * | 478 * |
| 479 */ | 479 */ |
| 480 cvox.TraverseContent.prototype.reset = function(domObj) { | 480 cvox.TraverseContent.prototype.reset = function(domObj) { |
| 481 window.getSelection().removeAllRanges(); | 481 window.getSelection().removeAllRanges(); |
| 482 }; | 482 }; |
| OLD | NEW |