I would like to set a property of a parent object every time a child object runs a callback function.
I have the following code:
function Track(id) {
this.callback = function(args) {
this.name = args;
}
this.child = new objectName(this.callback, property);
this.name = this.child.name;
}
I want this.name
to be updated every time this.callback
is called...Is there any way to do this?