Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 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 <include src="i18n_template_no_process.js"> | 5 <include src="i18n_template_no_process.js"> |
| 6 | 6 |
| 7 i18nTemplate.process(document, loadTimeData); | 7 (function() { |
|
arv (Not doing code reviews)
2015/07/07 22:35:28
We have real block scope now =P
Dan Beam
2015/07/08 02:22:30
Done. (in https://codereview.chromium.org/12295730
| |
| 8 | |
| 9 var docs = [document]; | |
| 10 | |
| 11 var importLinks = document.querySelectorAll('link[rel=import]'); | |
| 12 for (var i = 0; i < importLinks.length; ++i) { | |
| 13 docs.push(importLinks[i].import); | |
| 14 } | |
| 15 | |
| 16 for (var i = 0; i < docs.length; ++i) { | |
| 17 var doc = docs[i]; | |
| 18 i18nTemplate.process(doc, loadTimeData); | |
| 19 | |
| 20 var templates = doc.querySelectorAll('template'); | |
| 21 for (var j = 0; j < templates.length; ++j) { | |
| 22 i18nTemplate.process(templates[j].content, loadTimeData); | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 }()); | |
| OLD | NEW |