Chromium Code Reviews| 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-animated-pages' is a container for a page and animated subpages. | 7 * 'settings-animated-pages' is a container for a page and animated subpages. |
| 8 * It provides a set of common behaviors and animations. | 8 * It provides a set of common behaviors and animations. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 // Nothing to do if the subpage isn't wrapped in a <template> or the | 140 // Nothing to do if the subpage isn't wrapped in a <template> or the |
| 141 // template is already stamped. | 141 // template is already stamped. |
| 142 if (!template || template.if) | 142 if (!template || template.if) |
| 143 return; | 143 return; |
| 144 | 144 |
| 145 // Set the subpage's id for use by neon-animated-pages. | 145 // Set the subpage's id for use by neon-animated-pages. |
| 146 var subpage = /** @type {{_content: DocumentFragment}} */(template)._content | 146 var subpage = /** @type {{_content: DocumentFragment}} */(template)._content |
| 147 .querySelector('settings-subpage'); | 147 .querySelector('settings-subpage'); |
| 148 if (!subpage.id) | 148 if (!subpage.id) |
| 149 subpage.id = id; | 149 subpage.id = id; |
| 150 if (template.hasAttribute('skip-search')) { | |
|
Dan Beam
2016/08/06 01:50:27
no curlies
Dan Beam
2016/08/06 01:50:27
i guess this isn't a bad idea, but maybe just repe
dpapad
2016/08/08 17:27:01
Carrying over the 'no-search' attribute once progr
Dan Beam
2016/08/08 17:42:55
that's fine
dpapad
2016/08/08 18:15:20
Done.
| |
| 151 subpage.setAttribute('skip-search', ''); | |
| 152 } | |
| 150 | 153 |
| 151 // Render synchronously so neon-animated-pages can select the subpage. | 154 // Render synchronously so neon-animated-pages can select the subpage. |
| 152 template.if = true; | 155 template.if = true; |
| 153 template.render(); | 156 template.render(); |
| 154 }, | 157 }, |
| 155 }); | 158 }); |
| OLD | NEW |