Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* Copyright 2015 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 /** | |
| 6 * @fileoverview | |
| 7 * 'cr-dropdown-menu' is a Chrome-specific wrapper around paper-dropdown-menu. | |
| 8 * It includes a paper-dropdown so its content should just be a core-menu and | |
| 9 * items. | |
| 10 * | |
| 11 * Example: | |
| 12 * <cr-dropdown-menu> | |
| 13 * <core-menu> | |
| 14 * <paper-item>Chrome</paper-item> | |
| 15 * <paper-item>Firefox</paper-item> | |
| 16 * <paper-item>IE</paper-item> | |
| 17 * <paper-item>Opera</paper-item> | |
| 18 * </core-menu> | |
| 19 * </cr-dropdown-menu> | |
| 20 * | |
| 21 * @group Chrome Elements | |
| 22 * @element cr-dropdown-menu | |
| 23 */ | |
| 24 | |
| 25 Polymer('cr-dropdown-menu', { | |
| 26 publish: { | |
| 27 /** | |
| 28 * True if the menu is open. | |
| 29 * | |
| 30 * @attribute opened | |
| 31 * @type boolean | |
| 32 * @default false | |
| 33 */ | |
| 34 opened: false, | |
| 35 | |
| 36 /** | |
| 37 * A label for the control. The label is displayed if no item is selected. | |
| 38 * | |
| 39 * @attribute label | |
| 40 * @type string | |
| 41 * @default '<Dropdown Menu Label>' | |
| 42 */ | |
| 43 label: '<Dropdown Menu Label>', | |
| 44 }, | |
| 45 | |
| 46 domReady: function() { | |
| 47 var menu = this.querySelector('.menu'); | |
| 48 assert(menu, 'cr-dropdown-menu must have a menu child with class="menu".'); | |
|
michaelpg
2015/02/20 22:54:44
nit: remove variable
Jeremy Klein
2015/02/20 23:28:13
Done.
| |
| 49 } | |
|
michaelpg
2015/02/20 22:54:44
nit: add trailing ,
Jeremy Klein
2015/02/20 23:28:13
Done.
| |
| 50 }); | |
| OLD | NEW |