{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/1364","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/1364/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/1364/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/1364/events","html_url":"https://github.com/Polymer/polymer/issues/1364","id":66001899,"number":1364,"title":"[0.8] - default property values are not set by the time observers are called","user":{"login":"ebidel","id":238208,"avatar_url":"https://avatars.githubusercontent.com/u/238208?v=3","gravatar_id":"","url":"https://api.github.com/users/ebidel","html_url":"https://github.com/ebidel","followers_url":"https://api.github.com/users/ebidel/followers","following_url":"https://api.github.com/users/ebidel/following{/other_user}","gists_url":"https://api.github.com/users/ebidel/gists{/gist_id}","starred_url":"https://api.github.com/users/ebidel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebidel/subscriptions","organizations_url":"https://api.github.com/users/ebidel/orgs","repos_url":"https://api.github.com/users/ebidel/repos","events_url":"https://api.github.com/users/ebidel/events{/privacy}","received_events_url":"https://api.github.com/users/ebidel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Polymer/polymer/labels/0.8","name":"0.8","color":"00aa44"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-02T20:09:30Z","updated_at":"2015-04-05T16:40:52Z","closed_at":null,"body":"In this example, I'm seeing `this.published === undefined` in `keyChanged`. I'd expect all of the element's properties to have their default values by the time `keyChanged` is called:\r\n\r\n    Polymer({\r\n        is: 'google-sheets',\r\n        properties: {\r\n          key: {\r\n            type: String,\r\n            value: '',\r\n            observer: 'keyChanged'\r\n          },\r\n          published: {\r\n            type: Boolean,\r\n            value: false\r\n          }\r\n        },\r\n\r\n        keyChanged: function(newValue, oldValue) {\r\n          //this.published === undefined when the element loads\r\n        }\r\n    });\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/89804798","html_url":"https://github.com/Polymer/polymer/issues/1364#issuecomment-89804798","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/1364","id":89804798,"user":{"login":"ebidel","id":238208,"avatar_url":"https://avatars.githubusercontent.com/u/238208?v=3","gravatar_id":"","url":"https://api.github.com/users/ebidel","html_url":"https://github.com/ebidel","followers_url":"https://api.github.com/users/ebidel/followers","following_url":"https://api.github.com/users/ebidel/following{/other_user}","gists_url":"https://api.github.com/users/ebidel/gists{/gist_id}","starred_url":"https://api.github.com/users/ebidel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebidel/subscriptions","organizations_url":"https://api.github.com/users/ebidel/orgs","repos_url":"https://api.github.com/users/ebidel/repos","events_url":"https://api.github.com/users/ebidel/events{/privacy}","received_events_url":"https://api.github.com/users/ebidel/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T16:40:52Z","updated_at":"2015-04-05T16:40:52Z","body":"Thanks @sorvell. So is [this](https://github.com/Polymer/core-ajax/blob/0.8-preview/core-ajax.html#L308-L311) the recommended pattern now? I also want to react to individual properties changing later on.\r\n\r\n--\r\n@arthurevans I think we can be more precise in the [section on `observers`](https://www.polymer-project.org/0.8/docs/devguide/properties.html#observing-changes-to-multiple-properties). What's not clear:\r\n\r\n1. When does the callback get called? end of micro task?\r\n2. If any of the properties change, the callback gets called. People could think they all have to change."}}