OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 'flags-table' displays the list of flags. |
| 7 */ |
| 8 Polymer({ |
| 9 is: 'flags-table', |
| 10 |
| 11 properties: { |
| 12 /** |
| 13 * The set of flags. |
| 14 * @type !Array<!Flag> |
| 15 */ |
| 16 flags: { |
| 17 type: Array, |
| 18 value: function() { return []; }, |
| 19 }, |
| 20 }, |
| 21 |
| 22 observers: [ |
| 23 'flagsChanged_(flags.*)', |
| 24 ], |
| 25 |
| 26 /** |
| 27 * @param {!{path: string, value: string}} e |
| 28 * @private |
| 29 */ |
| 30 flagsChanged_: function(e) { |
| 31 var index = e.path.match(/\d+/); |
| 32 if (index) |
| 33 console.log('Flag ' + index[0] + ' set to ' + e.value); |
| 34 }, |
| 35 }); |
OLD | NEW |