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 * @polymerBehavior Tracks the initialization of a specified preference and | 6 * @polymerBehavior Tracks the initialization of a specified preference and |
7 * logs an error if the pref is not defined after prefs have been fetched. | 7 * logs an error if the pref is not defined after prefs have been fetched. |
8 */ | 8 */ |
9 var PrefControlBehavior = { | 9 var PrefControlBehavior = { |
10 properties: { | 10 properties: { |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (!this.pref) { | 33 if (!this.pref) { |
34 var error = 'Pref not found for element ' + this.tagName; | 34 var error = 'Pref not found for element ' + this.tagName; |
35 if (this.id) | 35 if (this.id) |
36 error += '#' + this.id; | 36 error += '#' + this.id; |
37 error += ' in ' + this.domHost.tagName; | 37 error += ' in ' + this.domHost.tagName; |
38 console.error(error); | 38 console.error(error); |
39 } | 39 } |
40 }.bind(this)); | 40 }.bind(this)); |
41 }, | 41 }, |
42 }; | 42 }; |
43 | |
OLD | NEW |