Lines Matching refs:js
8 `mojo_bindings.js`, which could be generated by the GN target
9 `//mojo/public/js:bindings`.
12 emitted in a `.js` file with the name based on the input `.mojom` file. Suppose
50 out/gen/services/echo/public/interfaces/echo.mojom.js
55 * `mojo_bindings.js`
56 __Note: This file must be included before any `.mojom.js` files.__
57 * `echo.mojom.js`
61 <script src="URL/to/mojo_bindings.js"></script>
62 <script src="URL/to/echo.mojom.js"></script>
89 <script src="URL/to/mojo_bindings.js"></script>
90 <script src="URL/to/echo.mojom.js"></script>
164 ``` js
202 By default, generated `.mojom.js` files automatically load Mojom dependencies.
203 For example, if `foo.mojom` imports `bar.mojom`, loading `foo.mojom.js` will
204 insert a `<script>` tag to load `bar.mojom.js`, if it hasn't been loaded.
206 The URL of `bar.mojom.js` is determined by:
208 * the URL of `foo.mojom.js`.
216 The URL of `foo.mojom.js` is:
218 http://example.org/scripts/b/c/foo.mojom.js
221 Then the URL of `bar.mojom.js` is supposed to be:
223 http://example.org/scripts/b/d/bar.mojom.js
226 If you would like `bar.mojom.js` to live at a different location, you need to
227 set `mojo.config.autoLoadMojomDeps` to `false` before loading `foo.mojom.js`,
228 and manually load `bar.mojom.js` yourself. Similarly, you need to turn off this
229 option if you merge `bar.mojom.js` and `foo.mojom.js` into a single file.
233 <script src="http://example.org/scripts/mojo_bindings.js"></script>
234 <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
238 <script src="http://example.org/scripts/mojo_bindings.js"></script>
242 <script src="http://example.org/scripts/b/d/bar.mojom.js"></script>
243 <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
246 ### Performance Tip: Avoid Loading the Same .mojom.js File Multiple Times
248 value), you might accidentally load the same `.mojom.js` file multiple times if
256 <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
259 <script src="http://example.org/scripts/b/d/bar.mojom.js"></script>
260 <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
262 <!-- Load bar.mojom.js twice; should be avoided. -->
263 <!-- when foo.mojom.js is loaded, it sees that bar.mojom.js is not yet loaded,
264 so it inserts another <script> tag for bar.mojom.js. -->
265 <script src="http://example.org/scripts/b/c/foo.mojom.js"></script>
266 <script src="http://example.org/scripts/b/d/bar.mojom.js"></script>
269 If a `.mojom.js` file is loaded for a second time, a warnings will be showed
277 | In Mojom | In generated .mojom.js |