{"action":"created","issue":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/362","labels_url":"https://api.github.com/repos/skatejs/skatejs/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/skatejs/skatejs/issues/362/comments","events_url":"https://api.github.com/repos/skatejs/skatejs/issues/362/events","html_url":"https://github.com/skatejs/skatejs/issues/362","id":111096871,"number":362,"title":"Add change() property callback that only gets fired when the property changes.","user":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/skatejs/skatejs/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/skatejs/skatejs/labels/rfc","name":"rfc","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/skatejs/skatejs/milestones/12","html_url":"https://github.com/skatejs/skatejs/milestones/0.14.0","labels_url":"https://api.github.com/repos/skatejs/skatejs/milestones/12/labels","id":1026593,"number":12,"title":"0.14.0","description":null,"creator":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":101,"state":"open","created_at":"2015-03-18T04:12:49Z","updated_at":"2015-10-15T00:29:05Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-10-13T03:38:05Z","updated_at":"2015-10-15T02:53:14Z","closed_at":null,"body":"### Use case\r\n\r\nThis is especially handy when wanting to re-render using `skate.render()` when the property changes, but not wanting to do it whenever `set` is called because `set` is called when the element is initialised and every time it is set, even if it is the same value.\r\n\r\n```js\r\nskate('my-element', {\r\n  properties: {\r\n    textContent: {\r\n      change: skate.render\r\n    }\r\n  },\r\n  render (elem) {\r\n    return `Hello, ${elem.textContent}!`;\r\n  }\r\n});\r\n```\r\n\r\n### Signature\r\n\r\nIt should receive the same arguments as `set` and be called `change`.\r\n\r\n### Tests\r\n\r\n- is not called if the property has no default value, when it is set up\r\n- is not called if the property has a default value, when it is set up\r\n- is not called if the property has a default value and it does not change\r\n- is not called if the property value does not change\r\n- is called if the property has no default value and it is set\r\n- is called if the property has a default value and it is set to a different value\r\n- is called if the property value changes"},"comment":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/comments/148265912","html_url":"https://github.com/skatejs/skatejs/issues/362#issuecomment-148265912","issue_url":"https://api.github.com/repos/skatejs/skatejs/issues/362","id":148265912,"user":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T02:53:13Z","updated_at":"2015-10-15T02:53:13Z","body":"@joscha Reworded. I'll update the test descriptions to suit."}}