Chromium Code Reviews| Index: ui/webui/resources/js/i18n_template_no_process.js |
| diff --git a/ui/webui/resources/js/i18n_template_no_process.js b/ui/webui/resources/js/i18n_template_no_process.js |
| index 9c951eeb89c084d8a43a472725f58f1d76433f47..6f1f71551569c037779a2938645f90ee6fd039c7 100644 |
| --- a/ui/webui/resources/js/i18n_template_no_process.js |
| +++ b/ui/webui/resources/js/i18n_template_no_process.js |
| @@ -111,7 +111,14 @@ var i18nTemplate = (function() { |
| }; |
| var attributeNames = Object.keys(handlers); |
| - var selector = 'html /deep/ [' + attributeNames.join('],[') + ']'; |
| + // Chrome for iOS must use Apple's UIWebView, which (as of April 2015) does |
| + // not have native shadow DOM support. If shadow DOM is supported (or |
| + // polyfilled), search for i18n attributes using the /deep/ selector; |
| + // otherwise, do not attempt to search within the shadow DOM. |
| + var selector = |
| + (window.document.body && window.document.body.createShadowRoot) ? |
| + 'html /deep/ [' + attributeNames.join('],[') + ']' : |
|
Dan Beam
2015/06/23 23:33:12
so this is whining in the console now about /deep/
|
| + '[' + attributeNames.join('],[') + ']'; |
| /** |
| * Processes a DOM tree with the {@code dictionary} map. |