I have an object that is defined like this:
function company(announcementID, callback){
this.url = 'https://poit.bolagsverket.se/poit/PublikSokKungorelse.do?method=presenteraKungorelse&diarienummer_presentera='+announcementID;
self = this
GM_xmlhttpRequest({
method: "GET",
url: this.url,
onload: function(data) {
self.data = data;
callback();
}
})
}
on the callback, I wish to reference another method for that object called "callbacktest", I'm trying to do it like this?
var mycompany = new company(announcementID, callbacktest);
if I would do it with an anonymous function, I would have written mycompany.callbacktest() but how do I reference "mycompany" from within its variables?