I created this jsfiddle for my question: https://jsfiddle.net/5eq19xm4/1/
function Parent()
{
this.ParentCallback = function(){
debugger;
//check value of this
}
}
function Child(parentCallback)
{
this.ChildCallback = parentCallback;
}
I don't understand why the value of "this" in the function "ParentCallback" is the child instead of the parent and how to workaround without a reference from the child to the parent.
I know this is something about the context of call but it's not clear in my mind.
I don't understand how I could refer to the parent in the function.