Thanks for the reply! 
I was looking into getters and setters because I wanted to throw some 
events when properties was changed, which for instance would allow a 
persistency layer to detect changes. I guess this could be dones more 
easily with Object.observe, and I will look into the observer functions set 
up by Polymer and possibly also the Object.observe's notification API.

Thanks again.

Den lørdag den 1. februar 2014 23.49.53 UTC+1 skrev Steve Orvell:
>
> Polymer sets up a property observer for you so you should not have to 
> setup a getter/setter like this. If you simply include a method named 
> 'objPropChanged', it'll be called whenever the property changes.
>
> objPropChanged: function(oldValue) {
>   // ....
> }
>
> You can customize the name of that method by using an observe block like 
> this:
>
> observe: {
>   objProp: '<methodName>'
>  }
>
> It's possible to use a getter/setter like you've done, but we don't 
> encourage it because it's a bit more work. To be compatible with 
> Object.observe, which Polymer uses when Chrome's experimental javascript 
> flag is on, you'll need to use Object.observe's notification api. See the 
> examples here for more information: 
> http://wiki.ecmascript.org/doku.php?id=harmony:observe_api_usage.
>
>
> On Sat, Feb 1, 2014 at 2:29 PM, <[email protected] <javascript:>> wrote:
>
>> I have discovered that this works in chrome 32 (not canary), the both 
>> spans are updated to match the input fields.
>>  
>> 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/8bbc6fde-f010-4b4b-b0d5-57ba0eed09f8%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/f3805457-de09-4117-ae84-9778eacc374f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to