Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: ui/webui/resources/js/cr/ui/list_selection_model.js

Issue 475633006: Typecheck JS files for chrome://extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@D_asserts_codingconvention
Patch Set: looked twice Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/js/cr/ui/list_selection_model.js
diff --git a/ui/webui/resources/js/cr/ui/list_selection_model.js b/ui/webui/resources/js/cr/ui/list_selection_model.js
index 897911955d1d6f7e96bfe05fdc445116d216adfa..beb804f316b58f266e5a2c241835ffc3986482a7 100644
--- a/ui/webui/resources/js/cr/ui/list_selection_model.js
+++ b/ui/webui/resources/js/cr/ui/list_selection_model.js
@@ -11,7 +11,7 @@ cr.define('cr.ui', function() {
* @param {number=} opt_length The number items in the selection.
*
* @constructor
- * @extends {!cr.EventTarget}
+ * @extends {cr.EventTarget}
*/
function ListSelectionModel(opt_length) {
this.length_ = opt_length || 0;
@@ -100,7 +100,7 @@ cr.define('cr.ui', function() {
/**
* Returns the nearest selected index or -1 if no item selected.
* @param {number} index The origin index.
- * @type {number}
+ * @return {number}
* @private
*/
getNearestSelectedIndex_: function(index) {
@@ -163,7 +163,7 @@ cr.define('cr.ui', function() {
unselectAll: function() {
this.beginChange();
for (var i in this.selectedIndexes_) {
- this.setIndexSelected(i, false);
+ this.setIndexSelected(parseInt(i, 10), false);
Dan Beam 2014/08/21 18:27:48 nit: +i
Vitaly Pavlenko 2014/08/22 01:43:41 Done.
}
this.endChange();
},

Powered by Google App Engine
This is Rietveld 408576698