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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/array_data_model.js

Issue 2935011: Initial accounts options page. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: use ListItem directly for now per arv Created 10 years, 5 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
« no previous file with comments | « chrome/browser/resources/options/preferences.js ('k') | chrome/browser/resources/shared/js/cr/ui/list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr/ui/array_data_model.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/array_data_model.js b/chrome/browser/resources/shared/js/cr/ui/array_data_model.js
index 54837b44caa00c0844145fac44673e85af6a5b27..b70f36c7157e9a00388084d7d1e670f9bf9fc895 100644
--- a/chrome/browser/resources/shared/js/cr/ui/array_data_model.js
+++ b/chrome/browser/resources/shared/js/cr/ui/array_data_model.js
@@ -33,7 +33,7 @@ cr.define('cr.ui', function() {
/**
* Returns the item at the given index.
- * @param {number} index The index of the element go get.
+ * @param {number} index The index of the element to get.
* @return {*} The element at the given index.
*/
item: function(index) {
@@ -52,6 +52,16 @@ cr.define('cr.ui', function() {
},
/**
+ * Returns an array of elements in a selected range.
+ * @param {number=} opt_from The starting index of the selected range.
+ * @param {number=} opt_to The ending index of selected range.
+ * @return {Array} An array of elements in the selected range.
+ */
+ slice: function(opt_from, opt_to) {
+ return this.array_.slice.apply(this.array_, arguments);
+ },
+
+ /**
* This removes and adds items to the model.
*
* This dispatches a splice event.
« no previous file with comments | « chrome/browser/resources/options/preferences.js ('k') | chrome/browser/resources/shared/js/cr/ui/list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698