For the record, yesterday Justin pointed out that putting filters directly on the PolymerExpressions prototype is probably a bad idea because of basic scoping issues.
I'm inclined to elevate some set of filters (Addy's set is a great start) to a canonical set that we can make the default, but going forward we probably want to have some way of selecting libraries of filters into specific elements via some kind of namespace. On Fri, Aug 1, 2014 at 7:12 AM, Martin Kleinschrodt < [email protected]> wrote: > Thanks, Eric! > > > On Friday, August 1, 2014 1:28:11 AM UTC+2, Eric Bidelman wrote: > >> Agreed we need some documentation on this. Opened an issue: >> https://github.com/Polymer/docs/issues/571 >> >> FWIW, Addy put together as nice list of filters that add themselves to >> PolymerExpression: https://github.com/addyosmani/polymer-filters >> >> >> >> >> On Fri, Jul 25, 2014 at 1:36 AM, Martin Kleinschrodt < >> [email protected]> wrote: >> >>> What's the preferred way of registering 'global' filters alongside the >>> 'built-in' ones? I understand that filters can be added by simply adding >>> them to the prototype of the PolymerExpressions object but that seems a >>> little messy. Are there any plans to add something like a >>> Polymer.registerFilter() function? Also, some documentation on this would >>> be nice. http://www.polymer-project.org/docs/polymer/ >>> expressions.html#custom-filters only describes defining custom filters >>> by adding them to the element prototype which in many cases is not the >>> optimal solution. >>> >>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Polymer" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/polymer-dev/69a0df72-cba9-490f-9c43-97aa005e1b6d% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/polymer-dev/69a0df72-cba9-490f-9c43-97aa005e1b6d%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> Follow Polymer on Google+: plus.google.com/107187849809354688692 > --- > You received this message because you are subscribed to the Google Groups > "Polymer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/b671fcea-89f7-4aad-8868-67557ac47afd%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/b671fcea-89f7-4aad-8868-67557ac47afd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAHbmOLYq6BnCSk_iugF3U1%2BVTq9%3D%2B4noomfZ3d74cp04rrE47g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
