when I have a method m
of an object o
with one variable that needs to be handed a FormData-Object and inside the o
object definition I want to define another method called n
that uses the method m
how can I solve the following reference problem:
o class {
n(){
$("#someForm").submit(
var data = new FormData(this); /* here the this keyword is the form */
this.m(data); /* here the this keyword should referece back to the instance of the object*/
);
}
m(formDataObj){...}
}
how can I make n() work?