Short question. I have the following situation:
function callbackTest(data, callback) {
callback.call(data);
}
var map = new Map("Worldmap");
var data = "My data";
callbackTest(data, map.processData);
So, my question is, wheather or not it is possible to access the map object from inside the callbackTest function?
You can’t access
mapunless you pass it in, orprocessDatahas a reference back tomap. Basically there’s no inherent.parentObjectproperty present when dealing with a generic object here.