We've gotten a number of PR's/issues from users asking for additional sugar around bindings and events in templates. We have a strong desire to keep Polymer's basic sugaring here as simple as possible and thus are not inclined to merge many of these changes.
However, we definitely do want to encourage users to easily add sugar they find useful. Then, based on community feedback we may decide to roll some of these changes into Polymer over time. Right now hooking into the template annotation and effect generation process is not well exposed. We should fix this to free our users to create awesomeness!
/sub
Fixed via https://github.com/Polymer/polymer/pull/4510 and https://github.com/Polymer/polymer/pull/4432.
The template parsing API provides overridable points to add parsing information to related to either nodes or templates, and the binding API allows for parsing and evaluating custom binding syntax. Finally, the template stamping API now provides the ability to parse and stamp bound templates (with any parsing/binding customization implemented via overrides above) _at runtime_.
See the new property-effects-template.html tests for examples on how to use these API's.
Most helpful comment
Fixed via https://github.com/Polymer/polymer/pull/4510 and https://github.com/Polymer/polymer/pull/4432.
The template parsing API provides overridable points to add parsing information to related to either nodes or templates, and the binding API allows for parsing and evaluating custom binding syntax. Finally, the template stamping API now provides the ability to parse and stamp bound templates (with any parsing/binding customization implemented via overrides above) _at runtime_.
See the new
property-effects-template.htmltests for examples on how to use these API's.