Could you please explain how the following code supposed to work
- can.Observe.startBatch()
- person1.attr('firstName', 'John')
- person1.attr('lastName', 'Doe')
- person1.children.push({firstName: 'Baby'})
- can.Observe.startBatch()
- person2.attr('firstName', 'Jane')
- can.Observe.stopBatch()
- can.Observe.stopBatch() // will ejs with item1 be updated only after this stopBatch call?
3 questions on this code:
1) will livebinded EJS with person2 be updated after can.Observe.stopBatch() called first time?
2) will livebinded EJS with person1 be updated only after this second stopBatch() called?
3) will it be updated only once (though we updated two attr (firstName and lastName) and pushed new item in Observe list (that is too live bind)