Add or remove a behavior in Polymer 1.0 on runtime -


it possible add or remove behavior in polymer 1.0 on runtime?

suppose mybehavior1 , mybehavior2 contains different implementation of method methodbehavior();

i want this:

  polymer({         is: 'my-element',          behaviors: [mybehavior.mybehavior1],          _method: function(something){               if (something == 'anotherthing'){                     this.push('behaviors', mybehavior.mybehavior2)               }               this.methodbehavior()         },   }); 

but not works: mybehavior2 added new implementation of method (this.methodbehavior()) isn't used.


Comments