| Index: ui/webui/resources/js/cr/ui/list_item.js
|
| diff --git a/ui/webui/resources/js/cr/ui/list_item.js b/ui/webui/resources/js/cr/ui/list_item.js
|
| index e548a8080186febe25af62b5dc25a7e0313748e7..cb6aacfc123504baf5c9ac2c6817326ba69ccdda 100644
|
| --- a/ui/webui/resources/js/cr/ui/list_item.js
|
| +++ b/ui/webui/resources/js/cr/ui/list_item.js
|
| @@ -11,6 +11,13 @@ cr.define('cr.ui', function() {
|
| */
|
| var ListItem = cr.ui.define('li');
|
|
|
| + /**
|
| + * The next id suffix to use when giving each item an unique id.
|
| + * @type {number}
|
| + * @private
|
| + */
|
| + ListItem.nextUniqueIdSuffix_ = 0;
|
| +
|
| ListItem.prototype = {
|
| __proto__: HTMLLIElement.prototype,
|
|
|
| @@ -36,6 +43,8 @@ cr.define('cr.ui', function() {
|
| */
|
| decorate: function() {
|
| this.setAttribute('role', 'listitem');
|
| + if (!this.id)
|
| + this.id = 'listitem-' + ListItem.nextUniqueIdSuffix_++;
|
| },
|
|
|
| /**
|
|
|