{"action":"created","issue":{"url":"https://api.github.com/repos/mikeric/rivets/issues/572","repository_url":"https://api.github.com/repos/mikeric/rivets","labels_url":"https://api.github.com/repos/mikeric/rivets/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/mikeric/rivets/issues/572/comments","events_url":"https://api.github.com/repos/mikeric/rivets/issues/572/events","html_url":"https://github.com/mikeric/rivets/issues/572","id":131734149,"number":572,"title":"Observer on prototype functions","user":{"login":"jccazeaux","id":5689583,"avatar_url":"https://avatars.githubusercontent.com/u/5689583?v=3","gravatar_id":"","url":"https://api.github.com/users/jccazeaux","html_url":"https://github.com/jccazeaux","followers_url":"https://api.github.com/users/jccazeaux/followers","following_url":"https://api.github.com/users/jccazeaux/following{/other_user}","gists_url":"https://api.github.com/users/jccazeaux/gists{/gist_id}","starred_url":"https://api.github.com/users/jccazeaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jccazeaux/subscriptions","organizations_url":"https://api.github.com/users/jccazeaux/orgs","repos_url":"https://api.github.com/users/jccazeaux/repos","events_url":"https://api.github.com/users/jccazeaux/events{/privacy}","received_events_url":"https://api.github.com/users/jccazeaux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-05T19:35:43Z","updated_at":"2016-02-26T21:38:32Z","closed_at":null,"body":"In the fiddle https://jsfiddle.net/jccazeaux/pdfd7tb0/ you will see that the template\r\n\r\n```html\r\n{ model.date.getTime }\r\n```\r\nIs not updated when date is changed.\r\nThe reason is in the databinding update system. It compares old and new value of expression before updating. In our example, when the date changes, Rivets (actually sightglass) compares the function getTime between old and new `date` value. As `getTime` is a function of Date prototype, it doesn't change when date changes.\r\n\r\nSee sightglass code here : https://github.com/mikeric/sightglass/blob/master/index.js#L128\r\n\r\n(If i must send the issue on sightglass let me know)"},"comment":{"url":"https://api.github.com/repos/mikeric/rivets/issues/comments/189491409","html_url":"https://github.com/mikeric/rivets/issues/572#issuecomment-189491409","issue_url":"https://api.github.com/repos/mikeric/rivets/issues/572","id":189491409,"user":{"login":"blikblum","id":3047126,"avatar_url":"https://avatars.githubusercontent.com/u/3047126?v=3","gravatar_id":"","url":"https://api.github.com/users/blikblum","html_url":"https://github.com/blikblum","followers_url":"https://api.github.com/users/blikblum/followers","following_url":"https://api.github.com/users/blikblum/following{/other_user}","gists_url":"https://api.github.com/users/blikblum/gists{/gist_id}","starred_url":"https://api.github.com/users/blikblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blikblum/subscriptions","organizations_url":"https://api.github.com/users/blikblum/orgs","repos_url":"https://api.github.com/users/blikblum/repos","events_url":"https://api.github.com/users/blikblum/events{/privacy}","received_events_url":"https://api.github.com/users/blikblum/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T21:38:32Z","updated_at":"2016-02-26T21:38:32Z","body":"In my proposed solution there's no performance impact, since will be reevaluated only when date changes. In your proposed solution it will be also evaluated when date changes with the memory usage penalty"}}