Within my JS script, there is a similar structure:
window.custom_object = {
//custom function defined
myFunction: function(param1,param2){
}
myNewFunction : function(){
//attempting to call myFunction from anotherFunction using 'this' keyword
this.myFunction();
}
}
Even though I am trying to call myFunction
in anotherFunction
using the this
keyword, it seems that during test executions, this
does not have a reference to myFunction
.
Various attempts to simulate the functionality of the this
keyword or redefine it have not been successful.