Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Unified Diff: mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl

Issue 2864753002: Mojo code generator: simplify how imported types and values are handled. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1fe27f72dd25dc87ccabb5cd2c9997f65a51ed30..3d0a4f480cbb932f788086bf08ccca60ecf8375d 100644
--- a/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
@@ -22,13 +22,12 @@
{%- for import in imports %}
var {{import.unique_name}} =
- mojo.internal.exposeNamespace('{{import.module.namespace}}');
+ mojo.internal.exposeNamespace('{{import.namespace}}');
if (mojo.config.autoLoadMojomDeps) {
mojo.internal.loadMojomIfNecessary(
- '{{import.module.path}}',
- new URL(
- '{{import.module|get_relative_path(module)}}.js',
- document.currentScript.src).href);
+ '{{import.path}}',
+ new URL('{{import|get_relative_path(module)}}.js',
+ document.currentScript.src).href);
}
{%- endfor %}
@@ -49,7 +48,7 @@ define("{{module.path}}", [
"mojo/public/js/core",
"mojo/public/js/validator",
{%- for import in imports %}
- "{{import.module.path}}",
+ "{{import.path}}",
{%- endfor %}
], function(
{%- if module.path !=

Powered by Google App Engine
This is Rietveld 408576698