Thanks a lot Steve, for easy solution, and full explanation :) W dniu wtorek, 25 lutego 2014 16:11:34 UTC+1 użytkownik Steve Orvell napisał: > > It's important to wait until the element's definition is ready before > stamping the template. Elements defined with <polymer-element> are > registered asynchronously, so the fix is to wrap the code in an event > handler that waits for the 'polymer-ready' event. Here's an updated example: > > http://jsfiddle.net/F8j3F/3/ > > More info: Node.bind allows elements to customize how they are bound. By > default most elements bind to attributes and these bindings are 1-way. > Polymer allows elements to expose published properties (those in the > attributes attribute or publish block) which bind as properties and are two > way. In order for this 2-way binding to be setup correctly, the element > must be created with the proper definition so that it gets the right bind > method implementation. If the element is bound when the definition is not > available, then an attribute binding is created and it is 1-way. > > > On Tue, Feb 25, 2014 at 4:37 AM, Marcin Warpechowski > <[email protected]<javascript:> > > wrote: > >> Now the behaviour in the OP JSFiddle link is consistent in Canary (WP >> flag enabled) and Chrome stable (WP flag disabled) - changes made inside >> the Polymer Element are not propagated to the model. >> >> Is this intentional? What's the workaround? >> >> >> On Thursday, January 23, 2014 5:57:32 PM UTC+1, Tomek W wrote: >>> >>> Hi, >>> >>> I'm a bit confused what is the right way to do so, especially that my >>> snippet behaves inconstantly between Canary and regular Chrome. >>> >>> Here http://jsfiddle.net/tomalec/F8j3F/ is an example. >>> >>> (I took from http://www.polymer-project.org/getting-started.html as a >>> merge of binding between elements and 'Publishing properties') >>> >>> In regular Chrome (32.0.1700.76 m) it behaves as I desire - it binds >>> all 4 {{name}} together. However, Canary (34.0.1799.0 canary) isolates >>> changes to (published) attribute made within custom element. >>> >>> Is it a bug in Canary? >>> If not, what is the correct way to notify outer binding about >>> attribute's change? >>> >>> Thanks, >>> >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/polymer-dev/ca68447a-1609-4aab-8d23-54568f8707ad%40googlegroups.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > >
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/27d07e02-ab29-4231-8185-7b5fd454bfd8%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
