Tagged: polymer-behaviors

PolymerJS: Using behaviors

Behaviours are simple enough to define:

    SomeThing  = {
        yo: function(yo) {

The above can have a properties object or various callbacks, just like a normal Polymer definition.

Then in the actual Polymer element, do something like:

    is: "some-thing",
    behaviors: [SomeThing],

Now you can share that behavior among multiple custom elements should you wish.

polymer polymer-behaviors

Page 1 of 1