out of curiosity and to increase my knowledge, i wanted to implement some kind of two way data binding between dom elements and javascript variables.
I was lucky enough to find an excellent answer to half of my problem here @ stackoverflow which led me to this gist https://gist.github.com/384583, but i still can't get the thing done at 100%.
Here's an example of my code: http://jsfiddle.net/bpH6Z/
If you try to run the fiddle and click on "view Value" you will get undefined, while i want to get the actual value of the object's attribute.
I am probably doing something wrong due to my lack of experience with javascript, but do you have any idea why i can't properly read the attribute 'secret' after the _bind() and _watch() calls?
DISCLAIMER: as i said, i'm doing this because i want better knowledge of javascript, and i am not going to write my framework. So any "USE FRAMEWORK X" is completely useless, as i could get the job done with angularjs.