Web UI Polymer 3: Change cr-toast-manager syntax
Change cr-toast-manager's cr.define to use: cr.define(... () => { function foo() {} let bar = ... return { foo: foo, }; }); syntax, to make it simpler to autogenerate the Polymer 3 version of this code by matching the polymer autogeneration script's approach to that of the JS modulizer script. It is possible to modify the autogeneration script to handle the code as-is, but this requires adding more annotations (e.g. to indicate whether variables should be let or const) and more complexity in the script (e.g. to replace ": " with "= " and to correctly handle arrow syntax). Also fixing some typechecking errors that were found by the compiler after changing the syntax. Bug: 965770 Change-Id: I7a725ad8513f4141bba13e13cd842133105cb60a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784101Reviewed-by:Esmael Elmoslimany <aee@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#693410}
Showing
Please register or sign in to comment