You can't do that directly. (Moreover .caller
is obsolete)
You can however use a dirty trick:
try{
parentFunction();//calls child
}catch(e){
//done
}
function child(){
doWhatever();
throw new Error("this will hopefully propagate");
}
Fiddle
This will only work assuming the parent does not catch exceptions itself when calling the child.
Moreover, it is generally a bad idea to use exceptions for flow control. Use this as a last resort.