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

Side by Side Diff: ui/webui/resources/cr_elements/cr_toggle_button/cr_toggle_button.js

Issue 987433007: JS cleanup for cr_elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « ui/webui/resources/cr_elements/cr_onc/cr_onc_types.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * `cr-toggle-button` provides a switch the user can toggle on or off by 7 * `cr-toggle-button` provides a switch the user can toggle on or off by
8 * tapping or by dragging. Wraps a `paper-toggle-button`. 8 * tapping or by dragging. Wraps a `paper-toggle-button`.
9 * 9 *
10 * Example: 10 * Example:
11 * 11 *
12 * <cr-toggle-button></cr-toggle-button> 12 * <cr-toggle-button></cr-toggle-button>
13 * 13 *
14 * @element cr-toggle-button 14 * @element cr-toggle-button
15 */ 15 */
16 Polymer({ 16 Polymer({
17 publish: { 17 publish: {
18 /** 18 /**
19 * Gets or sets the state. `true` is checked and `false` is unchecked. 19 * Gets or sets the state. `true` is checked and `false` is unchecked.
20 * 20 *
21 * @attribute checked 21 * @attribute checked
22 * @type boolean 22 * @type boolean
23 * @default false 23 * @default false
24 */ 24 */
25 checked: { 25 checked: {
26 value: false, 26 value: false,
27 reflect: true, 27 reflect: true,
28 }, 28 },
29 29
30
31 /** 30 /**
32 * If true, the toggle button is disabled. 31 * If true, the toggle button is disabled.
33 * 32 *
34 * @attribute disabled 33 * @attribute disabled
35 * @type boolean 34 * @type boolean
36 * @default false 35 * @default false
37 */ 36 */
38 disabled: { 37 disabled: {
39 value: false, 38 value: false,
40 reflect: true, 39 reflect: true,
41 }, 40 },
42 }, 41 },
43 42
44 ready: function() { 43 ready: function() {
45 this.$.events.forward(this.$.button, ['change']); 44 this.$.events.forward(this.$.button, ['change']);
46 }, 45 },
47 }); 46 });
OLDNEW
« no previous file with comments | « ui/webui/resources/cr_elements/cr_onc/cr_onc_types.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698