| Index: mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
|
| index 9b3046825c1d13e1efd24068d3a9e7fb74866087..aaa3ed557f7520e4111dd7a6b52f6df5ecf2fe6b 100644
|
| --- a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
|
| @@ -14,9 +14,14 @@ define("{{module.path}}", [
|
| {%- endfor -%}
|
| ) {
|
|
|
| +{#--- Constants #}
|
| +{% for constant in module.constants %}
|
| + var {{constant.name}} = {{constant.value|expression_to_text(module)}};
|
| +{%- endfor %}
|
| +
|
| {#--- Enums #}
|
| -{% from "enum_definition.tmpl" import enum_def -%}
|
| -{% for enum in enums %}
|
| +{%- from "enum_definition.tmpl" import enum_def %}
|
| +{%- for enum in enums %}
|
| var {{ enum_def(enum.name, enum, module) }}
|
| {%- endfor %}
|
|
|
| @@ -31,6 +36,9 @@ define("{{module.path}}", [
|
| {%- endfor %}
|
|
|
| var exports = {};
|
| +{% for constant in module.constants %}
|
| + exports.{{constant.name}} = {{constant.name}};
|
| +{%- endfor %}
|
| {%- for enum in enums %}
|
| exports.{{enum.name}} = {{enum.name}};
|
| {%- endfor %}
|
|
|