JSFiddle - React, Tailwind, and code Playground
JavaScript
$(document).ready(function() {
debugger;
var father = new Parent();
var son = new Child(father.ParentCallback);
son.ChildCallback();
});
function Parent()
{
this.ParentCallback = function(){
debugger;
//check value of this
}
}
function Child(parentCallback)
{
this.ChildCallback = parentCallback;
}