Actually it has the following code (arr - an array of properties) (KnockoutJS):
for (var prop in arr) { var val = this[arr[prop]]; if (val && ko.isSubscribable(val)) { (function (e, p) { e[p].subscribe(function (value) { e.processChange(p, value); }); })(this, arr[prop]); } }
The question is: what happens to this when it is passed inside the circuit? Only link is copied? if so, will the subscribe method and processChange be called on this object of this code?
Reasons for doubt:
In the piece of code that is far from this, the object that was here this, one of its properties is called a knockout setter, which pulls the subscription.
BUT! the object that the setter is invoked is not equal to the e
object when I stop in the subscription code for a breakpoint. And the subscription code is called just on the reaction of the setter.
In general, CHZH?