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

Unified Diff: ui/webui/resources/cr_elements/v0_8/demo_element.js

Issue 1124073007: Add demo_page.html to cr_elements/v0_8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
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);
+ }
+});

Powered by Google App Engine
This is Rietveld 408576698