1
portée Disons que j'ai une classe:Javascript Object Fonction
var asdf = new Class({
myFunction: function() {
//some stuff here
},
anotherFunction: function() {
globalObject.dosomethingandusecallback(
function() { // this is the callback
//how do I call myFunction() here? I can't seem to get it to work?
}
);
}
});
Il me semble avoir des problèmes de cadrage en essayant d'appeler maFonction dans la définition de ma fonction de rappel. Qu'est-ce que j'oublie ici? Je pensais qu'il devrait avoir accès à myFunction dans ce contexte?
Merci!