OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 6 * @fileoverview |
7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
8 * | 8 * |
9 * Example: | 9 * Example: |
10 * | 10 * |
11 * <settings-ui prefs="{{prefs}}"></settings-ui> | 11 * <settings-ui prefs="{{prefs}}"></settings-ui> |
12 * | 12 * |
13 * @group Chrome Settings Elements | 13 * @group Chrome Settings Elements |
14 * @element settings-ui | 14 * @element settings-ui |
15 */ | 15 */ |
16 Polymer({ | 16 Polymer({ |
17 is: 'settings-ui', | 17 is: 'settings-ui', |
18 | 18 |
19 properties: { | 19 properties: { |
20 /** | 20 /** |
21 * Preferences state. | 21 * Preferences state. |
22 * @type {?CrSettingsPrefsElement} | 22 * @type {?CrSettingsPrefsElement} |
23 */ | 23 */ |
24 prefs: Object, | 24 prefs: Object, |
25 }, | 25 }, |
26 | |
27 ready: function() { | |
28 assert(!document.documentElement.dir); | |
Dan Beam
2016/02/17 04:47:34
if this changes (i.e. dschuyler does <html dir="$i
| |
29 this.listen(document, 'i18n-processed', 'onI18nProcessed_'); | |
Dan Beam
2016/02/17 04:47:34
i can't use listeners because this doesn't bubble
michaelpg
2016/02/17 06:14:05
Why does this require waiting for this event at al
Dan Beam
2016/02/17 17:55:55
fixted it
| |
30 }, | |
31 | |
32 /** | |
33 * @param {!Event} e | |
34 * @private | |
35 */ | |
36 onI18nProcessed_: function(e) { | |
37 this.$.panel.rightDrawer = isRTL(); | |
38 }, | |
26 }); | 39 }); |
OLD | NEW |