Skip to content
  • yzshen's avatar
    Mojo JS bindings: change module loading solution. · a0646991
    yzshen authored
    This change takes place on the mojo/public/js/new_bindings copy so it doesn't
    affect existing users.
    
    - This change gets rid of AMD module loading. Now the bindings API is defined in
    the "mojo" namespace. At build time, all bindings files are combined
    into a single file "mojo_bindings.js". Users should use <script> tag to include
    this file (as well as generated mojom.js files).
    
    - Generated mojom.js files export their definitions under the same namespace as
    the "module" statement in the corresponding mojom files.
    
    - This change also adds a "use_new_js_bindings" option to the generator. It
      duplicates the control message mojom files in order to generate two
      different flavors of JS bindings.
    
    - The new bindings use the Mojo system API defined by Web IDL.
    
    BUG=699569
    
    Review-Url: https://codereview.chromium.org/2759563004
    Cr-Original-Commit-Position: refs/heads/master@{#459654}
    Committed: https://chromium.googlesource.com/chromium/src/+/e6a5534bb3fe61b5224f1a22e43ba957190ad5d0
    Review-Url: https://codereview.chromium.org/2759563004
    Cr-Commit-Position: refs/heads/master@{#461349}
    a0646991