OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 'error-dialog' is a dialog that displays error messages | 6 * @fileoverview 'error-dialog' is a dialog that displays error messages |
7 * in the user manager. | 7 * in the user manager. |
8 */ | 8 */ |
9 (function() { | 9 (function() { |
10 Polymer({ | 10 Polymer({ |
11 is: 'error-dialog', | 11 is: 'error-dialog', |
12 | 12 |
13 properties: { | 13 properties: { |
| 14 /** |
| 15 * The message shown in the dialog. |
| 16 * @private {string} |
| 17 */ |
| 18 message_: {type: String, value: ''} |
| 19 }, |
| 20 |
14 /** | 21 /** |
15 * The message shown in the dialog. | 22 * Displays the dialog populated with the given message. |
16 * @private {string} | 23 * @param {string} message Error message to show. |
17 */ | 24 */ |
18 message_: { | 25 show: function(message) { |
19 type: String, | 26 this.message_ = message; |
20 value: '' | 27 this.$.dialog.open(); |
21 } | 28 } |
22 }, | 29 }); |
23 | |
24 /** | |
25 * Displays the dialog populated with the given message. | |
26 * @param {string} message Error message to show. | |
27 */ | |
28 show: function(message) { | |
29 this.message_ = message; | |
30 this.$.dialog.open(); | |
31 } | |
32 }); | |
33 })(); | 30 })(); |
OLD | NEW |