shock01 / oig

Playing around with ES6, MVVM and stuff like that
1 stars 1 forks source link

When dataContext has array update method is not invoked on ContextElements #15

Closed shock01 closed 9 years ago

shock01 commented 9 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe

dataContext.values = [1,2,3];

When pushing a value to the array the object.observe will not work. Somehow we need to watch arrays as well. Might need an algorithm for deep watching.