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 /** @override */ |
| 47 domReady: function() { |
| 48 assert( |
| 49 this.querySelector('.menu'), |
| 50 'cr-dropdown-menu must have a menu child with class="menu".'); |
| 51 }, |
| 52 }); |
OLD | NEW |