Chromium Code Reviews| Index: ui/webui/resources/cr_elements/v0_8/demo_element.js |
| diff --git a/ui/webui/resources/cr_elements/v0_8/demo_element.js b/ui/webui/resources/cr_elements/v0_8/demo_element.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0b3e9cef61647415605eff83acca0ee392bc50b2 |
| --- /dev/null |
| +++ b/ui/webui/resources/cr_elements/v0_8/demo_element.js |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * @fileoverview Polymer element for UI wrapping a list of cr- elements. |
| + */ |
| +Polymer({ |
| + is: 'cr-demo-element', |
| + |
| + properties: { |
| + checkboxChecked: { |
| + type: Boolean, |
| + value: true, |
| + observer: 'checkboxCheckedChanged_' |
| + }, |
| + |
| + collapseOpened: { |
| + type: Boolean, |
| + value: true, |
| + observer: 'collapseOpenedChanged_' |
| + }, |
| + |
| + inputValue: { |
| + type: String, |
| + value: '', |
| + observer: 'inputValueChanged_' |
| + }, |
| + }, |
| + |
| + checkboxCheckedChanged_: function() { |
| + console.log('checkboxCheckedChanged=' + this.checkboxChecked); |
|
michaelpg
2015/05/15 02:45:29
for observer methods set in the properties block,
stevenjb
2015/05/15 03:01:41
Given that they should be equal, why would that be
michaelpg
2015/05/15 03:50:32
TL;DR: I meant this to be optional.
I guess it's
|
| + }, |
| + |
| + collapseOpenedChanged_: function() { |
| + console.log('collapseOpened=' + this.collapseOpened); |
| + }, |
| + |
| + inputValueChanged_: function() { |
| + console.log('inputValue=' + this.inputValue); |
| + } |
| +}); |