| Index: mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl b/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
|
| index 8772a404d8568fd54bb6c9588c870b23fe8415b8..1cb107f6873921a80099522050d6c45cc436c55f 100644
|
| --- a/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
|
| @@ -2,10 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -{%- if use_new_js_bindings %}
|
| +{%- if js_bindings_mode == "both" or js_bindings_mode == "new" %}
|
| +{{"new"|set_current_mode}}
|
|
|
| 'use strict';
|
|
|
| +{%- if js_bindings_mode == "both" %}
|
| +if (mojo && mojo.internal && mojo.config) {
|
| +{%- endif %}
|
| +
|
| (function() {
|
| var mojomId = '{{module.path}}';
|
| if (mojo.internal.isMojomLoaded(mojomId)) {
|
| @@ -35,7 +40,18 @@
|
| {% include "module_definition.tmpl" %}
|
| })();
|
|
|
| -{%- else %}
|
| +{%- if js_bindings_mode == "both" %}
|
| +}
|
| +{%- endif %}
|
| +
|
| +{%- endif %}
|
| +
|
| +{%- if js_bindings_mode == "both" or js_bindings_mode == "old" %}
|
| +{{"old"|set_current_mode}}
|
| +
|
| +{%- if js_bindings_mode == "both" %}
|
| +if (!mojo || !mojo.internal || !mojo.config) {
|
| +{%- endif %}
|
|
|
| define("{{module.path}}", [
|
| {%- if module.path !=
|
| @@ -68,4 +84,8 @@ codec, core, validator
|
| return exports;
|
| });
|
|
|
| +{%- if js_bindings_mode == "both" %}
|
| +}
|
| +{%- endif %}
|
| +
|
| {%- endif %}
|
|
|