Chromium Code Reviews| Index: chrome/browser/resources/shared/js/i18n_template.js |
| diff --git a/chrome/browser/resources/shared/js/i18n_template.js b/chrome/browser/resources/shared/js/i18n_template.js |
| index 2645bdbae507d760698e1f21c20848046c14f6e3..7b58ccec1874c0c9db101d23c54b7c432f4b2955 100644 |
| --- a/chrome/browser/resources/shared/js/i18n_template.js |
| +++ b/chrome/browser/resources/shared/js/i18n_template.js |
| @@ -39,6 +39,16 @@ var i18nTemplate = (function() { |
| }, |
| /** |
| + * This handler adds options to a select element. |
| + */ |
| + 'i18n-options': function(element, attributeValue, obj) { |
| + var options = obj[attributeValue]; |
| + options.forEach(function(values) { |
| + element.appendChild(new Option(values[1], values[0])); |
|
arv (Not doing code reviews)
2011/01/07 22:24:16
I think we should support an array of strings as w
James Hawkins
2011/01/07 22:41:15
Done.
|
| + }); |
| + }, |
| + |
| + /** |
| * This is used to set HTML attributes and DOM properties,. The syntax is: |
| * attributename:key; |
| * .domProperty:key; |