Polymer and globals

I get into Polymer and I like the deps resolution approach using imports.
And I love the extensibility through configuration behaviors

.
However, there is something I don't like about behavior in particular.
Looking at PolymerElements I can see that the behavior is defined inside the native html in the global object Polymer

and then referenced directly when imported by another component ..
For example:

paper-button

import paper-button-behavior

https://github.com/PolymerElements/paper-button/blob/master/paper-button.html#L14

it then defines paper-button-behavior

as behavior referencing global Polymer.PaperButtonBehavior

https://github.com/PolymerElements/paper-button/blob/master/paper-button.html#L144

which is defined here (imported html) https://github.com/PolymerElements/paper-behaviors/blob/master/paper-button-behavior.html#L49

Isn't this an anti-pattern, especially, as a rule, the application will not use the Polymer world exclusively?

+1


source to share





All Articles