Additionally, the only problem is, it will pollute the global environment, if using <script> instead of <link>
On Thursday, May 28, 2015 at 6:15:00 PM UTC+8, NanoWANG wrote: > > Hi all, > > So in 0.9 Mixins becomes Behaviors, but I can't even make the official > demo work. > > As said in the doc > <https://www.polymer-project.org/0.9/docs/devguide/behaviors.html>, I > should put the behavior object in a html file(which is weird since it'll > broke some build chains), and then do this: > > <link rel="import" href="highlight-behavior.html"> > > But all I got is `HighlightBehavior not defined` when runinng the line > > behaviors: [HighlightBehavior] > > On the other hand, I renamed the extension of the script to `.js` and > tried this: > <script src="highlight-behavior.js"> > > <script> > Polymer({ > is: 'my-element', > behaviors: [HighlightBehavior] > }); > </script> > > And it works fine. > > So I'm wondering is that a bug in docs or am I doing something wrong? > > Thx > > NanoWANG > 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/39c9e7ea-8c1d-4785-925d-19ca997da7e2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
