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

Unified Diff: mojo/public/js/new_bindings/base.js

Issue 2946383002: Support new-style Mojo JS core API on IOS. (Closed)
Patch Set: . Created 3 years, 6 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
« no previous file with comments | « ios/web/webui/web_ui_mojo_inttest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/new_bindings/base.js
diff --git a/mojo/public/js/new_bindings/base.js b/mojo/public/js/new_bindings/base.js
index db72d489db6ec016817ec1557a11812f33836b31..911d476d70e8ba48c4fd5574950f74aec9ed6588 100644
--- a/mojo/public/js/new_bindings/base.js
+++ b/mojo/public/js/new_bindings/base.js
@@ -34,17 +34,24 @@ mojo.config = {
// you merge bar.mojom.js and foo.mojom.js into a single file.
//
// Performance tip: Avoid loading the same mojom.js file multiple times.
- // Assume that |autoLoadMojomDeps| is set to true:
- // <!-- No duplicate loading; recommended. -->
+ // Assume that |autoLoadMojomDeps| is set to true,
+ //
+ // <!--
+ // (This comment tag is necessary on IOS to avoid interpreting the closing
+ // script tags in the example.)
+ //
+ // No duplicate loading; recommended:
// <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
//
- // <!-- No duplicate loading, although unnecessary. -->
+ // No duplicate loading, although unnecessary:
// <script src="http://example.org/scripts/b/d/bar.mojom.js"></script>
// <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
//
- // <!-- Load bar.mojom.js twice; should be avoided. -->
+ // Load bar.mojom.js twice; should be avoided:
// <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
// <script src="http://example.org/scripts/b/d/bar.mojom.js"></script>
+ //
+ // -->
autoLoadMojomDeps: true
};
@@ -99,7 +106,7 @@ mojo.config = {
markMojomPendingLoad(id);
internal.global.document.write('<script type="text/javascript" src="' +
- url + '"></script>');
+ url + '"><' + '/script>');
}
internal.exposeNamespace = exposeNamespace;
« no previous file with comments | « ios/web/webui/web_ui_mojo_inttest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698