Closed glassresistor closed 9 years ago
I'm trying to discover if the obeserver recursively checks the objects in the array or what.
it does not.
The behaviour I'd prefer is that the event only fires when the arrays order changes or contents are added/removed and not if the objects in the array are modified.
that's exactly how it works.
you can read more about Array.observe and Object.observe, the underlying primitives: http://www.html5rocks.com/en/tutorials/es7/observe/ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
Just curious if using the ArrayObserver and I do something like
Will the event fire once or twice? I'm trying to discover if the obeserver recursively checks the objects in the array or what. The behaviour I'd prefer is that the event only fires when the arrays order changes or contents are added/removed and not if the objects in the array are modified.