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

Side by Side Diff: resources/bookmark_manager/js/cr/ui/listitem.js

Issue 853002: Updating the Chromium reference build for Windows. The continuous... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/reference_builds/chrome/
Patch Set: Added the symbol files back. Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 cr.define('cr.ui', function() {
6
7 /**
8 * Creates a new list item element.
9 * @param {string} opt_label The text label for the item.
10 * @constructor
11 * @extends {HTMLLIElement}
12 */
13 var ListItem = cr.ui.define('li');
14
15 ListItem.prototype = {
16 __proto__: HTMLLIElement.prototype,
17
18 /**
19 * Plain text label.
20 * @type {string}
21 */
22 get label() {
23 return this.textContent;
24 },
25 set label(label) {
26 this.textContent = label;
27 },
28
29 /**
30 * Whether the item is the lead in a selection. Setting this does not update
31 * the underlying selection model. This is only used for display purpose.
32 * @type {boolean}
33 */
34 get lead() {
35 return this.hasAttribute('lead');
36 },
37 set lead(lead) {
38 if (lead) {
39 this.setAttribute('lead', '');
40 this.scrollIntoViewIfNeeded(false);
41 } else {
42 this.removeAttribute('lead');
43 }
44 },
45
46 /**
47 * Called when an element is decorated as a list item.
48 */
49 decorate: function() {
50 }
51 };
52
53 cr.defineProperty(ListItem, 'selected', cr.PropertyKind.BOOL_ATTR);
54
55 return {
56 ListItem: ListItem
57 };
58 });
OLDNEW
« no previous file with comments | « resources/bookmark_manager/js/cr/ui/list.js ('k') | resources/bookmark_manager/js/cr/ui/listselectionmodel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698